include: nuttx: timers: nxstyle error fix
Nxstyle error fix to silence the CI. Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
3bdf98cc33
commit
30a5a3edad
@ -1,4 +1,4 @@
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* include/nuttx/timers/cs2100-cp.h
|
||||
*
|
||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||
@ -31,14 +31,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_TIMERS_CS2100_CP_H
|
||||
#define __INCLUDE_NUTTX_TIMERS_CS2100_CP_H
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@ -47,9 +47,10 @@
|
||||
|
||||
#ifdef CONFIG_TIMERS_CS2100CP
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_I2C
|
||||
@ -65,7 +66,7 @@
|
||||
# undef CONFIG_CS2100CP_REGDEBUG
|
||||
#endif
|
||||
|
||||
/* Register Addresses ***********************************************************************/
|
||||
/* Register Addresses *******************************************************/
|
||||
|
||||
#define CS2100_DEVID 0x01 /* Device ID and Revision */
|
||||
#define CS2100_DEVCTL 0x02 /* Device Control */
|
||||
@ -79,7 +80,7 @@
|
||||
#define CS2100_FNCCFG2 0x17 /* Function Configuration 2 */
|
||||
#define CS2100_FNCCFG3 0x1e /* Function Configuration 3 */
|
||||
|
||||
/* Register Bit Field Definitions ***********************************************************/
|
||||
/* Register Bit Field Definitions *******************************************/
|
||||
|
||||
/* Device ID and Revision */
|
||||
|
||||
@ -104,6 +105,7 @@
|
||||
# define CS2100_DEVCFG1_AUXOUTSRC_CLKIN (1 << CS2100_DEVCFG1_AUXOUTSRC_SHIFT) /* CLK_IN */
|
||||
# define CS2100_DEVCFG1_AUXOUTSRC_CLKOUT (2 << CS2100_DEVCFG1_AUXOUTSRC_SHIFT) /* CLK_OUT */
|
||||
# define CS2100_DEVCFG1_AUXOUTSRC_PLLLOCK (3 << CS2100_DEVCFG1_AUXOUTSRC_SHIFT) /* PLL Lock Status Indicator*/
|
||||
|
||||
#define CS2100_DEVCFG1_RMODSEL_SHIFT (5) /* Bit 5-7: Selects R-Mod value */
|
||||
#define CS2100_DEVCFG1_RMODSEL_MASK (7 << CS2100_DEVCFG1_RMODSEL_SHIFT)
|
||||
# define CS2100_DEVCFG1_RMODSEL_NONE (0 << CS2100_DEVCFG1_RMODSEL_SHIFT) /* Left-shift R-value by 0 (x 1) */
|
||||
@ -153,9 +155,9 @@
|
||||
# define CS2100_FNCCFG3_CLKINBW_64HZ (6 << CS2100_FNCCFG3_CLKINBW_SHIFT) /* 64 Hz */
|
||||
# define CS2100_FNCCFG3_CLKINBW_128HZ (7 << CS2100_FNCCFG3_CLKINBW_SHIFT) /* 128 Hz */
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
struct cs2100_config_s
|
||||
{
|
||||
@ -169,9 +171,9 @@ struct cs2100_config_s
|
||||
bool xtal; /* false: Refclck, true: Crystal on XTI/XTO */
|
||||
};
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
@ -181,13 +183,13 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
struct i2c_master_s; /* Forward reference */
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: cs2100_enable
|
||||
*
|
||||
* Description:
|
||||
@ -199,39 +201,41 @@ struct i2c_master_s; /* Forward reference */
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno value on failure.
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int cs2100_enable(FAR const struct cs2100_config_s *config);
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: cs2100_disable
|
||||
*
|
||||
* Description:
|
||||
* Disable CS2100 CLK_OUT
|
||||
*
|
||||
* Input Parameters:
|
||||
* config - CS2100-CP configuration (Needed only for I2C access: i2c and i2caddr)
|
||||
* config - CS2100-CP configuration
|
||||
* (Needed only for I2C access: i2c and i2caddr)
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno value on failure.
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int cs2100_disable(FAR const struct cs2100_config_s *config);
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: cs2100_dump
|
||||
*
|
||||
* Description:
|
||||
* Dump CS2100-CP registers to the SysLog
|
||||
*
|
||||
* Input Parameters:
|
||||
* config - CS2100-CP configuration (Needed only for I2C access: i2c and i2caddr)
|
||||
* config - CS2100-CP configuration
|
||||
* (Needed only for I2C access: i2c and i2caddr)
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno value on failure.
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_CS2100CP_DEBUG
|
||||
int cs2100_dump(FAR const struct cs2100_config_s *config);
|
||||
|
@ -56,18 +56,20 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: dsxxxx_rtc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the hardware RTC per the selected configuration. This function is
|
||||
* called once during the OS initialization sequence by board-specific logic.
|
||||
* Initialize the hardware RTC per the selected configuration.
|
||||
* This function is called once during the OS initialization sequence by
|
||||
* board-specific logic.
|
||||
*
|
||||
* After dsxxxx_rtc_initialize() is called, the OS function clock_synchronize()
|
||||
* should also be called to synchronize the system timer to the hardware RTC. That
|
||||
* operation is normally performed automatically by the system during clock
|
||||
* initialization. However, when an external RTC is used, the board logic will
|
||||
* need to explicitly re-synchronize the system timer to the RTC when the RTC
|
||||
* After dsxxxx_rtc_initialize() is called, the OS function
|
||||
* clock_synchronize() should also be called to synchronize the system
|
||||
* timer to the hardware RTC. That operation is normally performed
|
||||
* automatically by the system during clock initialization.
|
||||
* However, when an external RTC is used, the board logic will need to
|
||||
* explicitly re-synchronize the system timer to the RTC when the RTC
|
||||
* becomes available.
|
||||
*
|
||||
* Input Parameters:
|
||||
@ -76,7 +78,7 @@ extern "C"
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno on failure
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
struct i2c_master_s; /* Forward reference */
|
||||
int dsxxxx_rtc_initialize(FAR struct i2c_master_s *i2c);
|
||||
|
@ -52,7 +52,9 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* IOCTL commands ***********************************************************/
|
||||
|
||||
/* These commands are used by applications to access the oneshot lower-half
|
||||
* logic via the oneshot character driver IOCTL command. Since the oneshot
|
||||
* driver is a device control interface and not a data transfer interface,
|
||||
@ -187,8 +189,9 @@
|
||||
*/
|
||||
|
||||
struct oneshot_lowerhalf_s;
|
||||
typedef CODE void (*oneshot_callback_t)(FAR struct oneshot_lowerhalf_s *lower,
|
||||
FAR void *arg);
|
||||
typedef CODE void (*oneshot_callback_t)
|
||||
(FAR struct oneshot_lowerhalf_s *lower,
|
||||
FAR void *arg);
|
||||
|
||||
/* The one short operations supported by the lower half driver */
|
||||
|
||||
@ -206,7 +209,9 @@ struct oneshot_operations_s
|
||||
FAR struct timespec *ts);
|
||||
};
|
||||
|
||||
/* This structure describes the state of the oneshot timer lower-half driver */
|
||||
/* This structure describes the state of the oneshot timer lower-half
|
||||
* driver
|
||||
*/
|
||||
|
||||
struct oneshot_lowerhalf_s
|
||||
{
|
||||
|
@ -56,19 +56,21 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: pcf85263_rtc_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the hardware RTC per the selected configuration. This function is
|
||||
* called once during the OS initialization sequence by board-specific logic.
|
||||
* Initialize the hardware RTC per the selected configuration.
|
||||
* This function is called once during the OS initialization sequence by
|
||||
* board-specific logic.
|
||||
*
|
||||
* After pcf85263_rtc_initialize() is called, the OS function clock_synchronize()
|
||||
* should also be called to synchronize the system timer to a hardware RTC. That
|
||||
* operation is normally performed automatically by the system during clock
|
||||
* initialization. However, when an external RTC is used, the board logic will
|
||||
* need to explicitly re-synchronize the system timer to the RTC when the RTC
|
||||
* becomes available.
|
||||
* After pcf85263_rtc_initialize() is called, the OS function
|
||||
* clock_synchronize() should also be called to synchronize the system
|
||||
* timer to a hardware RTC.
|
||||
* That operation is normally performed automatically by the system during
|
||||
* clock initialization. However, when an external RTC is used, the board
|
||||
* logic will need to explicitly re-synchronize the system timer to the RTC
|
||||
* when the RTC becomes available.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
@ -76,7 +78,7 @@ extern "C"
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno on failure
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
struct i2c_master_s; /* Forward reference */
|
||||
int pcf85263_rtc_initialize(FAR struct i2c_master_s *i2c);
|
||||
|
@ -38,9 +38,9 @@
|
||||
|
||||
/* For the purposes of this driver, a PWM device is any device that generates
|
||||
* periodic output pulses s of controlled frequency and pulse width. Such a
|
||||
* device might be used, for example, to perform pulse-width modulated output or
|
||||
* frequency/pulse-count modulated output (such as might be needed to control
|
||||
* a stepper motor).
|
||||
* device might be used, for example, to perform pulse-width modulated output
|
||||
* or frequency/pulse-count modulated output (such as might be needed to
|
||||
* control a stepper motor).
|
||||
*
|
||||
* The PWM driver is split into two parts:
|
||||
*
|
||||
@ -87,34 +87,35 @@
|
||||
* ioctl calls. The PWM ioctl commands are listed below:
|
||||
*
|
||||
* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next pulsed
|
||||
* output. This command will neither start nor stop the pulsed output.
|
||||
* It will either setup the configuration that will be used when the
|
||||
* output is started; or it will change the characteristics of the pulsed
|
||||
* output on the fly if the timer is already started. This command will
|
||||
* set the PWM characteristics and return immediately.
|
||||
* output. This command will neither start nor stop the pulsed output.
|
||||
* It will either setup the configuration that will be used when the
|
||||
* output is started; or it will change the characteristics of the pulsed
|
||||
* output on the fly if the timer is already started. This command will
|
||||
* set the PWM characteristics and return immediately.
|
||||
*
|
||||
* ioctl argument: A read-only reference to struct pwm_info_s that provides
|
||||
* the characteristics of the pulsed output.
|
||||
* ioctl argument: A read-only reference to struct pwm_info_s that provides
|
||||
* the characteristics of the pulsed output.
|
||||
*
|
||||
* PWMIOC_GETCHARACTERISTICS - Get the currently selected characteristics of
|
||||
* the pulsed output (independent of whether the output is start or stopped).
|
||||
* the pulsed output (independent of whether the
|
||||
* output is start or stopped).
|
||||
*
|
||||
* ioctl argument: A reference to struct pwm_info_s to receive the
|
||||
* characteristics of the pulsed output.
|
||||
* ioctl argument: A reference to struct pwm_info_s to receive the
|
||||
* characteristics of the pulsed output.
|
||||
*
|
||||
* PWMIOC_START - Start the pulsed output. The PWMIOC_SETCHARACTERISTICS
|
||||
* command must have previously been sent. If CONFIG_PWM_PULSECOUNT is
|
||||
* defined and the pulse count was configured to a non-zero value, then
|
||||
* this ioctl call will, by default, block until the programmed pulse count
|
||||
* completes. That default blocking behavior can be overridden by using
|
||||
* the O_NONBLOCK flag when the PWM driver is opened.
|
||||
* command must have previously been sent. If CONFIG_PWM_PULSECOUNT is
|
||||
* defined and the pulse count was configured to a non-zero value, then
|
||||
* this ioctl call will, by default, block until the programmed pulse count
|
||||
* completes. That default blocking behavior can be overridden by using
|
||||
* the O_NONBLOCK flag when the PWM driver is opened.
|
||||
*
|
||||
* ioctl argument: None
|
||||
* ioctl argument: None
|
||||
*
|
||||
* PWMIOC_STOP - Stop the pulsed output. This command will stop the PWM
|
||||
* and return immediately.
|
||||
* and return immediately.
|
||||
*
|
||||
* ioctl argument: None
|
||||
* ioctl argument: None
|
||||
*/
|
||||
|
||||
#define PWMIOC_SETCHARACTERISTICS _PWMIOC(1)
|
||||
@ -146,6 +147,7 @@ struct pwm_info_s
|
||||
|
||||
#ifdef CONFIG_PWM_MULTICHAN
|
||||
/* Per-channel output state */
|
||||
|
||||
struct pwm_chan_s channels[CONFIG_PWM_NCHANNELS];
|
||||
|
||||
#else
|
||||
@ -175,8 +177,8 @@ struct pwm_ops_s
|
||||
CODE int (*setup)(FAR struct pwm_lowerhalf_s *dev);
|
||||
|
||||
/* This method is called when the driver is closed. The lower half driver
|
||||
* should stop pulsed output, free any resources, disable the timer hardware, and
|
||||
* put the system into the lowest possible power usage state
|
||||
* should stop pulsed output, free any resources, disable the timer
|
||||
* hardware, and put the system into the lowest possible power usage state
|
||||
*/
|
||||
|
||||
CODE int (*shutdown)(FAR struct pwm_lowerhalf_s *dev);
|
||||
@ -212,9 +214,9 @@ struct pwm_ops_s
|
||||
* maintain state information.
|
||||
*
|
||||
* Normally that timer logic will have its own, custom state structure
|
||||
* that is simply cast to struct pwm_lowerhalf_s. In order to perform such casts,
|
||||
* the initial fields of the custom state structure match the initial fields
|
||||
* of the following generic PWM state structure.
|
||||
* that is simply cast to struct pwm_lowerhalf_s. In order to perform such
|
||||
* casts, the initial fields of the custom state structure match the initial
|
||||
* fields of the following generic PWM state structure.
|
||||
*/
|
||||
|
||||
struct pwm_lowerhalf_s
|
||||
@ -249,6 +251,7 @@ extern "C"
|
||||
/****************************************************************************
|
||||
* "Upper-Half" PWM Driver Interfaces
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pwm_register
|
||||
*
|
||||
@ -265,7 +268,7 @@ extern "C"
|
||||
* filesystem. The recommended convention is to name all PWM drivers
|
||||
* as "/dev/pwm0", "/dev/pwm1", etc. where the driver path differs only
|
||||
* in the "minor" number at the end of the device name.
|
||||
* dev - A pointer to an instance of lower half timer driver. This instance
|
||||
* dev - A pointer to an instance of lower half timer driver. This instance
|
||||
* is bound to the PWM driver and must persists as long as the driver
|
||||
* persists.
|
||||
*
|
||||
|
@ -50,7 +50,9 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* IOCTL Commands ***********************************************************/
|
||||
|
||||
/* The watchdog driver uses a standard character driver framework. However,
|
||||
* since the watchdog driver is a device control interface and not a data
|
||||
* transfer interface, the majority of the functionality is implemented in
|
||||
@ -63,7 +65,8 @@
|
||||
* WDIOC_STOP - Stop the watchdog timer
|
||||
* Argument: Ignored
|
||||
* WDIOC_GETSTATUS - Get the status of the watchdog timer.
|
||||
* Argument: A writeable pointer to struct watchdog_status_s.
|
||||
* Argument: A writeable pointer to struct
|
||||
* watchdog_status_s.
|
||||
* WDIOC_SETTIMEOUT - Reset the watchdog timeout to this value
|
||||
* Argument: A 32-bit timeout value in milliseconds.
|
||||
* WDIOC_CAPTURE - Do not reset. Instead, called this handler.
|
||||
@ -90,6 +93,7 @@
|
||||
#define WDIOC_MINTIME _WDIOC(0x080)
|
||||
|
||||
/* Bit Settings *************************************************************/
|
||||
|
||||
/* Bit settings for the struct watchdog_status_s flags field */
|
||||
|
||||
#define WDFLAGS_ACTIVE (1 << 0) /* 1=The watchdog timer is running */
|
||||
@ -100,6 +104,7 @@
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* This is the type of the argument passed to the WDIOC_CAPTURE ioctl */
|
||||
|
||||
struct watchdog_capture_s
|
||||
@ -127,7 +132,8 @@ struct watchdog_status_s
|
||||
struct watchdog_lowerhalf_s;
|
||||
struct watchdog_ops_s
|
||||
{
|
||||
/* Required methods ********************************************************/
|
||||
/* Required methods *******************************************************/
|
||||
|
||||
/* Start the watchdog timer, resetting the time to the current timeout */
|
||||
|
||||
CODE int (*start)(FAR struct watchdog_lowerhalf_s *lower);
|
||||
@ -136,7 +142,8 @@ struct watchdog_ops_s
|
||||
|
||||
CODE int (*stop)(FAR struct watchdog_lowerhalf_s *lower);
|
||||
|
||||
/* Optional methods ********************************************************/
|
||||
/* Optional methods *******************************************************/
|
||||
|
||||
/* Reset the watchdog timer to the current timeout value, prevent any
|
||||
* imminent watchdog timeouts. This is sometimes referred as "pinging" the
|
||||
* watchdog timer or "petting the dog".
|
||||
@ -207,15 +214,15 @@ extern "C"
|
||||
* Name: watchdog_register
|
||||
*
|
||||
* Description:
|
||||
* This function binds an instance of a "lower half" watchdog driver with the
|
||||
* "upper half" watchdog device and registers that device so that can be used
|
||||
* by application code.
|
||||
* This function binds an instance of a "lower half" watchdog driver with
|
||||
* the "upper half" watchdog device and registers that device so that can
|
||||
* be used by application code.
|
||||
*
|
||||
* When this function is called, the "lower half" driver should be in the
|
||||
* disabled state (as if the stop() method had already been called).
|
||||
*
|
||||
* NOTE: This function would not be called by application code. Rather it is
|
||||
* called indirectly through the architecture-specific interfaces.
|
||||
* NOTE: This function would not be called by application code. Rather it
|
||||
* is called indirectly through the architecture-specific interfaces.
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev path - The full path to the driver to be registers in the NuttX
|
||||
|
Loading…
x
Reference in New Issue
Block a user