Skip to content

Commit

Permalink
add adc_fifo_size when it over 300
Browse files Browse the repository at this point in the history
Signed-off-by: zhangkai25 <[email protected]>
  • Loading branch information
zhangkai25 committed Sep 13, 2024
1 parent 4a147fc commit 3ec9c9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/nuttx/analog/adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@

#if !defined(CONFIG_ADC_FIFOSIZE)
# define CONFIG_ADC_FIFOSIZE 8
#elif CONFIG_ADC_FIFOSIZE > 255
#elif CONFIG_ADC_FIFOSIZE > 65535
# undef CONFIG_ADC_FIFOSIZE
# define CONFIG_ADC_FIFOSIZE 255
# define CONFIG_ADC_FIFOSIZE 65535
#endif

#if !defined(CONFIG_ADC_NPOLLWAITERS)
Expand Down Expand Up @@ -117,8 +117,8 @@ begin_packed_struct struct adc_msg_s
struct adc_fifo_s
{
sem_t af_sem; /* Counting semaphore */
uint8_t af_head; /* Index to the head [IN] index in the circular buffer */
uint8_t af_tail; /* Index to the tail [OUT] index in the circular buffer */
uint16_t af_head; /* Index to the head [IN] index in the circular buffer */
uint16_t af_tail; /* Index to the tail [OUT] index in the circular buffer */
/* Circular buffer of CAN messages */
struct adc_msg_s af_buffer[CONFIG_ADC_FIFOSIZE];
};
Expand Down

0 comments on commit 3ec9c9a

Please sign in to comment.