drivers/analog/ and include/nuttx/analog: Fix typos and nxstyle issues.

This commit is contained in:
Ouss4
2020-06-12 15:33:38 +01:00
committed by Alan Carvalho de Assis
parent 6c68c2b892
commit 0acf6da4d8
8 changed files with 78 additions and 48 deletions
+14 -12
View File
@@ -95,8 +95,8 @@
struct adc_dev_s;
struct adc_callback_s
{
/* This method is called from the lower half, platform-specific ADC logic when
* new ADC sample data is available.
/* This method is called from the lower half, platform-specific ADC logic
* when new ADC sample data is available.
*
* Input Parameters:
* dev - The ADC device structure that was previously registered by
@@ -108,7 +108,8 @@ struct adc_callback_s
* Zero on success; a negated errno value on failure.
*/
CODE int (*au_receive)(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data);
CODE int (*au_receive)(FAR struct adc_dev_s *dev, uint8_t ch,
int32_t data);
};
/* This describes on ADC message */
@@ -130,7 +131,7 @@ struct adc_fifo_s
struct adc_msg_s af_buffer[CONFIG_ADC_FIFOSIZE];
};
/* This structure defines all of the operations providd by the architecture
/* This structure defines all of the operations provided by the architecture
* specific logic. All fields must be provided with non-NULL function
* pointers by the caller of adc_register().
*/
@@ -138,8 +139,8 @@ struct adc_fifo_s
struct adc_dev_s;
struct adc_ops_s
{
/* Bind the upper-half driver callbacks to the lower-half implementation. This
* must be called early in order to receive ADC event notifications.
/* Bind the upper-half driver callbacks to the lower-half implementation.
* This must be called early in order to receive ADC event notifications.
*/
CODE int (*ao_bind)(FAR struct adc_dev_s *dev,
@@ -153,14 +154,14 @@ struct adc_ops_s
/* Configure the ADC. This method is called the first time that the ADC
* device is opened. This will occur when the port is first opened.
* This setup includes configuring and attaching ADC interrupts. Interrupts
* are all disabled upon return.
* This setup includes configuring and attaching ADC interrupts.
* Interrupts are all disabled upon return.
*/
CODE int (*ao_setup)(FAR struct adc_dev_s *dev);
/* Disable the ADC. This method is called when the ADC device is closed.
* This method reverses the operation the setup method.
* This method reverses the operation of the setup method.
*/
CODE void (*ao_shutdown)(FAR struct adc_dev_s *dev);
@@ -171,12 +172,13 @@ struct adc_ops_s
/* All ioctl calls will be routed through this method */
CODE int (*ao_ioctl)(FAR struct adc_dev_s *dev, int cmd, unsigned long arg);
CODE int (*ao_ioctl)(FAR struct adc_dev_s *dev, int cmd,
unsigned long arg);
};
/* This is the device structure used by the driver. The caller of
* adc_register() must allocate and initialize this structure. The calling
* logic need only set all fields to zero except:
* logic needs to set all fields to zero except:
*
* The elements of 'ad_ops', and 'ad_priv'
*
@@ -195,7 +197,7 @@ struct adc_dev_s
struct adc_fifo_s ad_recv; /* Describes receive FIFO */
/* The following is a list of poll structures of threads waiting for
* driver events. The 'struct pollfd' reference for each open is also
* driver events. The 'struct pollfd' reference for each open is also
* retained in the f_priv field of the 'struct file'.
*/
+7 -7
View File
@@ -65,7 +65,8 @@ struct comp_callback_s
* comparator output state changes.
*
* Input Parameters:
* dev - The COMP device structure that was previously registered by adc_register()
* dev - The COMP device structure that was previously registered by
* adc_register()
* val - The actual value of the comparator output.
*
* Returned Value:
@@ -79,7 +80,6 @@ struct comp_ops_s
{
/* Bind the upper-half driver callbacks to the lower-half implementation. This
* must be called early in order to receive COMP event notifications.
*/
CODE int (*ao_bind)(FAR struct comp_dev_s *dev,
@@ -94,7 +94,7 @@ struct comp_ops_s
CODE int (*ao_setup)(FAR struct comp_dev_s *dev);
/* Disable the COMP. This method is called when the COMP device is closed.
* This method reverses the operation the setup method.
* This method reverses the operation of the setup method.
* Works only if COMP device is not locked.
*/
@@ -114,10 +114,10 @@ struct comp_dev_s
#ifdef CONFIG_COMP
/* Fields managed by common upper half COMP logic */
uint8_t ad_ocount; /* The number of times the device has been opened */
uint8_t ad_ocount; /* The number of times the device has been opened */
uint8_t val; /* Comparator value after output transition event */
sem_t ad_sem; /* Used to serialize access */
sem_t ad_readsem; /* Blocking read */
sem_t ad_sem; /* Used to serialize access */
sem_t ad_readsem; /* Blocking read */
/* pollfd's for output transition events */
@@ -131,7 +131,7 @@ struct comp_dev_s
};
/************************************************************************************
* Public Functions
* Public Function Prototypes
************************************************************************************/
#if defined(__cplusplus)
+7 -5
View File
@@ -96,7 +96,7 @@ struct dac_fifo_s
struct dac_msg_s af_buffer[CONFIG_DAC_FIFOSIZE];
};
/* This structure defines all of the operations providd by the architecture
/* This structure defines all of the operations provided by the architecture
* specific logic. All fields must be provided with non-NULL function
* pointers by the caller of dac_register().
*/
@@ -119,8 +119,9 @@ struct dac_ops_s
CODE int (*ao_setup)(FAR struct dac_dev_s *dev);
/* Disable the DAC. This method is called when the DAC device is closed.
* This method reverses the operation the setup method.
* This method reverses the operation of the setup method.
*/
CODE void (*ao_shutdown)(FAR struct dac_dev_s *dev);
/* Call to enable or disable TX interrupts */
@@ -133,12 +134,13 @@ struct dac_ops_s
/* All ioctl calls will be routed through this method */
CODE int (*ao_ioctl)(FAR struct dac_dev_s *dev, int cmd, unsigned long arg);
CODE int (*ao_ioctl)(FAR struct dac_dev_s *dev, int cmd,
unsigned long arg);
};
/* This is the device structure used by the driver. The caller of
* dac_register() must allocate and initialize this structure. The
* calling logic need only set all fields to zero except:
* calling logic needs to set all fields to zero except:
*
* The elements of 'ad_ops', and 'ad_priv'
*
@@ -162,7 +164,7 @@ struct dac_dev_s
****************************************************************************/
/****************************************************************************
* Public Functions
* Public Function Prototypes
****************************************************************************/
#if defined(__cplusplus)
+2 -2
View File
@@ -66,7 +66,7 @@ struct opamp_ops_s
CODE int (*ao_setup)(FAR struct opamp_dev_s *dev);
/* Disable the OPAMP. This method is called when the OPAMP device is closed.
* This method reverses the operation the setup method.
* This method reverses the operation of the setup method.
* Works only if OPAMP device is not locked.
*/
@@ -93,7 +93,7 @@ struct opamp_dev_s
};
/************************************************************************************
* Public Functions
* Public Function Prototypes
************************************************************************************/
#if defined(__cplusplus)