nuttx-apps/examples/pwm/pwm.h
raiden00pl 2ad3e4e17b examples/pwm: remove refenrences to PULSECOUNT
Remove refenrences to PULSECOUNT from PWM example.
Pulse count driver will be handled by separate application.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-22 13:39:32 +08:00

80 lines
3 KiB
C

/****************************************************************************
* apps/examples/pwm/pwm.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __APPS_EXAMPLES_PWM_PWM_H
#define __APPS_EXAMPLES_PWM_PWM_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* CONFIG_NSH_BUILTIN_APPS - Build the PWM test as an NSH built-in function.
* 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_DUTYPCTn - The initial PWM duty as a percentage for
* channel n. Default: 50%
* CONFIG_EXAMPLES_PWM_CHANNELn - The PWM channel number for channel n.
* Default: n
* CONFIG_EXAMPLES_PWM_DURATION - The initial PWM pulse train duration
* in seconds.
* Default: 5 seconds
*/
#ifndef CONFIG_PWM
# error "PWM device support is not enabled (CONFIG_PWM)"
#endif
#ifndef CONFIG_EXAMPLES_PWM_DEVPATH
# define CONFIG_EXAMPLES_PWM_DEVPATH "/dev/pwm0"
#endif
#ifndef CONFIG_EXAMPLES_PWM_FREQUENCY
# define CONFIG_EXAMPLES_PWM_FREQUENCY 100
#endif
#ifndef CONFIG_EXAMPLES_PWM_DURATION
# define CONFIG_EXAMPLES_PWM_DURATION 5
#endif
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#endif /* __APPS_EXAMPLES_PWM_PWM_H */