Skip to content

Commit b584b38

Browse files
zhangkai25xiaoxiang781216
authored andcommitted
add adc_fifo_size when it over 300
Signed-off-by: zhangkai25 <[email protected]>
1 parent fd182da commit b584b38

File tree

1 file changed

+4
-4
lines changed
  • include/nuttx/analog

1 file changed

+4
-4
lines changed

include/nuttx/analog/adc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050

5151
#if !defined(CONFIG_ADC_FIFOSIZE)
5252
# define CONFIG_ADC_FIFOSIZE 8
53-
#elif CONFIG_ADC_FIFOSIZE > 255
53+
#elif CONFIG_ADC_FIFOSIZE > 65535
5454
# undef CONFIG_ADC_FIFOSIZE
55-
# define CONFIG_ADC_FIFOSIZE 255
55+
# define CONFIG_ADC_FIFOSIZE 65535
5656
#endif
5757

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

0 commit comments

Comments
 (0)