mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 21:43:34 +08:00
Add a watchdog timer test
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4614 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -6,8 +6,43 @@
|
||||
config EXAMPLES_PWM
|
||||
bool "Pulse width modulation (PWM) example"
|
||||
default n
|
||||
depends on PWM && NSH_BUILTIN_APPS
|
||||
---help---
|
||||
Enable the Pulse width modulation (PWM) example
|
||||
|
||||
if EXAMPLES_PWM
|
||||
|
||||
config EXAMPLES_PWM_DEVPATH
|
||||
string "PWM device path"
|
||||
default "/dev/pwm0"
|
||||
---help---
|
||||
The path to the PWM device. Default: /dev/pwm0
|
||||
|
||||
config EXAMPLES_PWM_FREQUENCY
|
||||
int "Default PWM freququency"
|
||||
default 100
|
||||
---help---
|
||||
The default PWM frequency. Default: 100 Hz
|
||||
|
||||
config EXAMPLES_PWM_DUTYPCT
|
||||
int "Default PWM duty percentage"
|
||||
default 50
|
||||
---help---
|
||||
The default PWM duty as a percentage. Default: 50%
|
||||
|
||||
config EXAMPLES_PWM_DURATION
|
||||
int "Default PWM duration"
|
||||
default 5 if !EXAMPLES_PWM_PULSECOUNT
|
||||
---help---
|
||||
The default PWM pulse train duration in seconds. Used only if the current
|
||||
pulse count is zero (pulse countis only supported if CONFIG_PWM_PULSECOUNT
|
||||
is defined). Default: 5 seconds
|
||||
|
||||
config EXAMPLES_PWM_PULSECOUNT
|
||||
int "Default pulse count"
|
||||
default 0
|
||||
---help---
|
||||
The initial PWM pulse count. This option is only available if CONFIG_PWM_PULSECOUNT
|
||||
is nonzero. Default: 0 (i.e., use the duration, not the count).
|
||||
|
||||
endif
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
-include $(TOPDIR)/Make.defs
|
||||
include $(APPDIR)/Make.defs
|
||||
|
||||
# NuttX NX Graphics Example.
|
||||
# PWM Example.
|
||||
|
||||
ASRCS =
|
||||
CSRCS = pwm_main.c
|
||||
@@ -56,7 +56,7 @@ endif
|
||||
|
||||
ROOTDEPPATH = --dep-path .
|
||||
|
||||
# Touchscreen built-in application info
|
||||
# PWM built-in application info
|
||||
|
||||
APPNAME = pwm
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* examples/examples/pwm.h
|
||||
* examples/examples/pwm/pwm.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -52,10 +52,10 @@
|
||||
* CONFIG_EXAMPLES_PWM_DEVPATH - The path to the PWM device. Default: /dev/pwm0
|
||||
* CONFIG_EXAMPLES_PWM_FREQUENCY - The initial PWM frequency. Default: 100 Hz
|
||||
* CONFIG_EXAMPLES_PWM_DUTYPCT - The initial PWM duty as a percentage. Default: 50%
|
||||
* CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration in sectonds.
|
||||
* as a percentage. Used only if the current pulse count is zero (pulse count
|
||||
* is only supported if CONFIG_PWM_PULSECOUNT is defined). Default: 5 seconds
|
||||
* CONFIG_EXAMPLES_PWM_COUNT - The initial PWM pulse count. This option is
|
||||
* CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration in seconds.
|
||||
* Used only if the current pulse count is zero (pulse count is only supported
|
||||
* if CONFIG_PWM_PULSECOUNT is defined). Default: 5 seconds
|
||||
* CONFIG_EXAMPLES_PWM_PULSECOUNT - The initial PWM pulse count. This option is
|
||||
* only available if CONFIG_PWM_PULSECOUNT is defined. Default: 0 (i.e., use
|
||||
* the duration, not the count).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user