mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Merge remote-tracking branch 'origin/master' into misoc
This commit is contained in:
@@ -2268,7 +2268,7 @@ static int lpc17_epalloc(struct usbhost_driver_s *drvr,
|
||||
*/
|
||||
|
||||
sem_init(&ed->wdhsem, 0, 0);
|
||||
sem_setprotocol(&priv->wdhsem, SEM_PRIO_NONE);
|
||||
sem_setprotocol(&ed->wdhsem, SEM_PRIO_NONE);
|
||||
|
||||
/* Link the common tail TD to the ED's TD list */
|
||||
|
||||
@@ -3308,7 +3308,9 @@ errout_with_sem:
|
||||
|
||||
static int lpc17_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
{
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
struct lpc17_usbhost_s *priv = (struct lpc17_usbhost_s *)drvr;
|
||||
#endif
|
||||
struct lpc17_ed_s *ed = (struct lpc17_ed_s *)ep;
|
||||
struct lpc17_gtd_s *td;
|
||||
struct lpc17_gtd_s *next;
|
||||
@@ -3316,7 +3318,7 @@ static int lpc17_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep)
|
||||
uint32_t ctrl;
|
||||
irqstate_t flags;
|
||||
|
||||
DEBUGASSERT(priv != NULL && ed != NULL);
|
||||
DEBUGASSERT(drvr != NULL && ed != NULL);
|
||||
|
||||
/* These first steps must be atomic as possible */
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
(ADC_SMPR_DEFAULT << ADC_SMPR2_SMP8_SHIFT) | \
|
||||
(ADC_SMPR_DEFAULT << ADC_SMPR2_SMP9_SHIFT))
|
||||
#elif defined(CONFIG_STM32_STM32F30XX)
|
||||
# ifdef ADC_HAVE_DMA || (ADC_MAX_SAMPLES == 1)
|
||||
# if defined(ADC_HAVE_DMA) || (ADC_MAX_SAMPLES == 1)
|
||||
# define ADC_SMPR_DEFAULT ADC_SMPR_61p5
|
||||
# else /* Slow down sampling frequency */
|
||||
# define ADC_SMPR_DEFAULT ADC_SMPR_601p5
|
||||
|
||||
@@ -578,7 +578,7 @@ CONFIG_PREALLOC_TIMERS=4
|
||||
#
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
CONFIG_USER_ENTRYPOINT="buttons_main"
|
||||
CONFIG_USER_ENTRYPOINT="archbuttons_main"
|
||||
CONFIG_RR_INTERVAL=200
|
||||
# CONFIG_SCHED_SPORADIC is not set
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
|
||||
@@ -63,8 +63,10 @@ CONFIG_ARCH_ARM=y
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_RISCV is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_XTENSA is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
@@ -349,6 +351,12 @@ CONFIG_STM32_HAVE_ADC1_DMA=y
|
||||
# CONFIG_STM32_HAVE_ADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC3_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC4_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
|
||||
CONFIG_STM32_HAVE_CAN1=y
|
||||
# CONFIG_STM32_HAVE_CAN2 is not set
|
||||
CONFIG_STM32_HAVE_DAC1=y
|
||||
@@ -432,7 +440,7 @@ CONFIG_STM32_CCMEXCLUDE=y
|
||||
#
|
||||
# ADC Configuration
|
||||
#
|
||||
CONFIG_STM32_ADC1_DMA=y
|
||||
# CONFIG_STM32_ADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_RTC_COUNTER is not set
|
||||
# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set
|
||||
|
||||
@@ -667,6 +675,8 @@ CONFIG_DEV_NULL=y
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
@@ -674,6 +684,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_ANALOG=y
|
||||
@@ -722,6 +733,7 @@ CONFIG_ADC_FIFOSIZE=8
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
@@ -820,6 +832,8 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
# CONFIG_LIBC_WCHAR is not set
|
||||
# CONFIG_LIBC_LOCALE is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -870,7 +884,9 @@ CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0"
|
||||
CONFIG_EXAMPLES_ADC_NSAMPLES=0
|
||||
CONFIG_EXAMPLES_ADC_GROUPSIZE=4
|
||||
CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
# CONFIG_EXAMPLES_ARCHBUTTONS is not set
|
||||
# CONFIG_EXAMPLES_BUTTONS is not set
|
||||
# CONFIG_EXAMPLES_CCTYPE is not set
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_DHCPD is not set
|
||||
@@ -889,10 +905,10 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
@@ -940,6 +956,7 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
@@ -983,6 +1000,7 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -63,8 +63,10 @@ CONFIG_ARCH_ARM=y
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_RISCV is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_XTENSA is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
@@ -354,6 +356,12 @@ CONFIG_STM32_HAVE_ADC4=y
|
||||
# CONFIG_STM32_HAVE_ADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC3_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC4_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
|
||||
CONFIG_STM32_HAVE_CAN1=y
|
||||
# CONFIG_STM32_HAVE_CAN2 is not set
|
||||
CONFIG_STM32_HAVE_DAC1=y
|
||||
@@ -676,6 +684,8 @@ CONFIG_CAN_NPENDINGRTR=4
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
@@ -683,6 +693,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
@@ -724,6 +735,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
@@ -822,6 +834,8 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
# CONFIG_LIBC_WCHAR is not set
|
||||
# CONFIG_LIBC_LOCALE is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -868,12 +882,14 @@ CONFIG_ARCH_HAVE_TLS=y
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# CONFIG_EXAMPLES_ARCHBUTTONS is not set
|
||||
# CONFIG_EXAMPLES_BUTTONS is not set
|
||||
CONFIG_EXAMPLES_CAN=y
|
||||
CONFIG_EXAMPLES_CAN_DEVPATH="/dev/can0"
|
||||
# CONFIG_EXAMPLES_CAN_READ is not set
|
||||
# CONFIG_EXAMPLES_CAN_WRITE is not set
|
||||
CONFIG_EXAMPLES_CAN_READWRITE=y
|
||||
# CONFIG_EXAMPLES_CCTYPE is not set
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_DHCPD is not set
|
||||
@@ -892,10 +908,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
@@ -943,6 +959,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
@@ -986,6 +1003,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -683,6 +683,8 @@ CONFIG_DEV_NULL=y
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
|
||||
@@ -63,8 +63,10 @@ CONFIG_ARCH_ARM=y
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_RISCV is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_XTENSA is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
@@ -351,6 +353,12 @@ CONFIG_STM32_HAVE_ADC4=y
|
||||
# CONFIG_STM32_HAVE_ADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC3_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC4_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
|
||||
CONFIG_STM32_HAVE_CAN1=y
|
||||
# CONFIG_STM32_HAVE_CAN2 is not set
|
||||
CONFIG_STM32_HAVE_DAC1=y
|
||||
@@ -675,14 +683,14 @@ CONFIG_CAN_NPENDINGRTR=4
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_SPI_SLAVE is not set
|
||||
CONFIG_SPI_EXCHANGE=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_SPI_HWFEATURES is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_SPI_BITORDER is not set
|
||||
# CONFIG_SPI_CS_DELAY_CONTROL is not set
|
||||
# CONFIG_SPI_DRIVER is not set
|
||||
@@ -693,6 +701,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
@@ -728,6 +737,7 @@ CONFIG_LCD_MAXPOWER=1
|
||||
# CONFIG_LCD_MIO283QT2 is not set
|
||||
# CONFIG_LCD_MIO283QT9A is not set
|
||||
# CONFIG_LCD_UG9664HSWAG01 is not set
|
||||
# CONFIG_LCD_SH1106_OLED_132 is not set
|
||||
# CONFIG_LCD_UG2864HSWEG01 is not set
|
||||
# CONFIG_LCD_UG2832HSWEG04 is not set
|
||||
CONFIG_LCD_SSD1351=y
|
||||
@@ -789,6 +799,7 @@ CONFIG_LCD_LANDSCAPE=y
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
@@ -977,6 +988,8 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
# CONFIG_LIBC_WCHAR is not set
|
||||
# CONFIG_LIBC_LOCALE is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -1023,8 +1036,10 @@ CONFIG_ARCH_HAVE_TLS=y
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# CONFIG_EXAMPLES_ARCHBUTTONS is not set
|
||||
# CONFIG_EXAMPLES_BUTTONS is not set
|
||||
# CONFIG_EXAMPLES_CAN is not set
|
||||
# CONFIG_EXAMPLES_CCTYPE is not set
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_DHCPD is not set
|
||||
@@ -1044,10 +1059,10 @@ CONFIG_ARCH_HAVE_TLS=y
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_VPLANE=0
|
||||
CONFIG_EXAMPLES_NXLINES_DEVNO=0
|
||||
@@ -1102,6 +1117,7 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
@@ -1145,6 +1161,7 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -63,8 +63,10 @@ CONFIG_ARCH_ARM=y
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_RISCV is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_XTENSA is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
@@ -349,6 +351,12 @@ CONFIG_STM32_HAVE_ADC4=y
|
||||
# CONFIG_STM32_HAVE_ADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC3_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC4_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
|
||||
CONFIG_STM32_HAVE_CAN1=y
|
||||
# CONFIG_STM32_HAVE_CAN2 is not set
|
||||
CONFIG_STM32_HAVE_DAC1=y
|
||||
@@ -674,6 +682,8 @@ CONFIG_PWM_NCHANNELS=2
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
@@ -681,6 +691,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
@@ -722,6 +733,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
@@ -825,6 +837,8 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
# CONFIG_LIBC_WCHAR is not set
|
||||
# CONFIG_LIBC_LOCALE is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -875,7 +889,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# CONFIG_EXAMPLES_ARCHBUTTONS is not set
|
||||
# CONFIG_EXAMPLES_BUTTONS is not set
|
||||
# CONFIG_EXAMPLES_CCTYPE is not set
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_DHCPD is not set
|
||||
@@ -894,10 +910,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
@@ -954,6 +970,7 @@ CONFIG_EXAMPLES_PWM_CHANNEL2=2
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
@@ -1024,6 +1041,7 @@ CONFIG_NSH_DISABLE_LOSMART=y
|
||||
# CONFIG_NSH_DISABLE_MOUNT is not set
|
||||
# CONFIG_NSH_DISABLE_MV is not set
|
||||
# CONFIG_NSH_DISABLE_MW is not set
|
||||
CONFIG_NSH_DISABLE_PRINTF=y
|
||||
# CONFIG_NSH_DISABLE_PS is not set
|
||||
# CONFIG_NSH_DISABLE_PUT is not set
|
||||
# CONFIG_NSH_DISABLE_PWD is not set
|
||||
@@ -1089,6 +1107,8 @@ CONFIG_SYSTEM_CLE_DEBUGLEVEL=0
|
||||
CONFIG_READLINE_HAVE_EXTMATCH=y
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_SYSTEM is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -58,13 +58,23 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#if defined(ADC1_HAVE_DMA) && defined(CONFIG_STM32_ADC1)
|
||||
# warning "ADC1 with DMA support is not fully implemented"
|
||||
# undef CONFIG_STM32_ADC1
|
||||
#endif
|
||||
|
||||
#if defined(ADC2_HAVE_DMA) && defined(CONFIG_STM32_ADC2)
|
||||
# warning "ADC2 with DMA support is not fully implemented"
|
||||
# undef CONFIG_STM32_ADC2
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_STM32_ADC1) && defined(CONFIG_STM32_ADC2)) || \
|
||||
(defined(CONFIG_STM32_ADC3) && defined(CONFIG_STM32_ADC4))
|
||||
# error "will not work with this combination of ADCs"
|
||||
#endif
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* 1 or 2 ADC devices (DEV1, DEV2) */
|
||||
|
||||
#if defined(CONFIG_STM32_ADC1)
|
||||
@@ -106,16 +116,8 @@
|
||||
/* The number of ADC channels in the conversion list */
|
||||
/* TODO DMA */
|
||||
|
||||
#if defined(ADC1_HAVE_DMA)
|
||||
# error "ADC1 with DMA support is not fully implemented"
|
||||
#else
|
||||
# define ADC1_NCHANNELS 4
|
||||
#endif
|
||||
#if defined(ADC2_HAVE_DMA)
|
||||
# error "ADC2 with DMA support is not fully implemented"
|
||||
#else
|
||||
# define ADC2_NCHANNELS 3
|
||||
#endif
|
||||
#define ADC1_NCHANNELS 4
|
||||
#define ADC2_NCHANNELS 3
|
||||
#define ADC3_NCHANNELS 3
|
||||
#define ADC4_NCHANNELS 1
|
||||
|
||||
|
||||
@@ -53,6 +53,17 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#undef HAVE_LEDS
|
||||
#undef HAVE_DAC
|
||||
|
||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||
# define HAVE_LEDS 1
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DAC)
|
||||
# define HAVE_DAC 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -84,9 +95,11 @@
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#if defined(HAVE_LEDS) || defined(HAVE_DAC)
|
||||
int ret;
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||
#ifdef HAVE_LEDS
|
||||
/* Register the LED driver */
|
||||
|
||||
ret = userled_lower_initialize(LED_DRIVER_PATH);
|
||||
@@ -101,7 +114,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
* faut le faire ici
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DAC)
|
||||
#ifdef HAVE_DAC
|
||||
ret = board_dac_setup();
|
||||
if (ret < 0)
|
||||
{
|
||||
|
||||
@@ -63,8 +63,10 @@ CONFIG_ARCH_ARM=y
|
||||
# CONFIG_ARCH_MIPS is not set
|
||||
# CONFIG_ARCH_RGMP is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_RISCV is not set
|
||||
# CONFIG_ARCH_SIM is not set
|
||||
# CONFIG_ARCH_X86 is not set
|
||||
# CONFIG_ARCH_XTENSA is not set
|
||||
# CONFIG_ARCH_Z16 is not set
|
||||
# CONFIG_ARCH_Z80 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
@@ -349,6 +351,12 @@ CONFIG_STM32_HAVE_ADC4=y
|
||||
# CONFIG_STM32_HAVE_ADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC3_DMA is not set
|
||||
# CONFIG_STM32_HAVE_ADC4_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3 is not set
|
||||
# CONFIG_STM32_HAVE_SDADC1_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC2_DMA is not set
|
||||
# CONFIG_STM32_HAVE_SDADC3_DMA is not set
|
||||
CONFIG_STM32_HAVE_CAN1=y
|
||||
# CONFIG_STM32_HAVE_CAN2 is not set
|
||||
CONFIG_STM32_HAVE_DAC1=y
|
||||
@@ -653,6 +661,8 @@ CONFIG_DEV_NULL=y
|
||||
CONFIG_ARCH_HAVE_I2CRESET=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set
|
||||
# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set
|
||||
CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
@@ -660,6 +670,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ONESHOT is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
@@ -701,6 +712,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_HAVE_USBTRACE is not set
|
||||
# CONFIG_DRIVERS_WIRELESS is not set
|
||||
# CONFIG_DRIVERS_CONTACTLESS is not set
|
||||
|
||||
#
|
||||
# System Logging
|
||||
@@ -799,6 +811,8 @@ CONFIG_LIBM=y
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
# CONFIG_LIBC_WCHAR is not set
|
||||
# CONFIG_LIBC_LOCALE is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -881,7 +895,9 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# CONFIG_EXAMPLES_ARCHBUTTONS is not set
|
||||
# CONFIG_EXAMPLES_BUTTONS is not set
|
||||
# CONFIG_EXAMPLES_CCTYPE is not set
|
||||
# CONFIG_EXAMPLES_CHAT is not set
|
||||
# CONFIG_EXAMPLES_CONFIGDATA is not set
|
||||
# CONFIG_EXAMPLES_CXXTEST is not set
|
||||
@@ -902,10 +918,10 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0
|
||||
# CONFIG_EXAMPLES_NRF24L01TERM is not set
|
||||
# CONFIG_EXAMPLES_NSH is not set
|
||||
# CONFIG_EXAMPLES_NULL is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXFFS is not set
|
||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||
# CONFIG_EXAMPLES_NX is not set
|
||||
# CONFIG_EXAMPLES_NXLINES is not set
|
||||
# CONFIG_EXAMPLES_NXTERM is not set
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
@@ -956,6 +972,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan"
|
||||
#
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
# CONFIG_INTERPRETERS_MINIBASIC is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
|
||||
#
|
||||
@@ -1000,6 +1017,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan"
|
||||
# CONFIG_READLINE_HAVE_EXTMATCH is not set
|
||||
# CONFIG_SYSTEM_READLINE is not set
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
# CONFIG_SYSTEM_TEE is not set
|
||||
# CONFIG_SYSTEM_UBLOXMODEM is not set
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -596,7 +596,7 @@ CONFIG_PREALLOC_TIMERS=4
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
# CONFIG_INIT_FILEPATH is not set
|
||||
CONFIG_USER_ENTRYPOINT="buttons_main"
|
||||
CONFIG_USER_ENTRYPOINT="archbuttons_main"
|
||||
CONFIG_RR_INTERVAL=200
|
||||
# CONFIG_SCHED_SPORADIC is not set
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
|
||||
CSRCS += sem_init.c sem_getprotocol.c sem_getvalue.c
|
||||
|
||||
ifneq ($(CONFIG_PRIORITY_INHERITANCE),y)
|
||||
CSRCS += sem_setprotocol.c
|
||||
endif
|
||||
|
||||
# Add the semaphore directory to the build
|
||||
|
||||
DEPPATH += --dep-path semaphore
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/****************************************************************************
|
||||
* libc/semaphore/sem_setprotocol.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
#ifndef CONFIG_PRIORITY_INHERITANCE
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Function: sem_setprotocol
|
||||
*
|
||||
* Description:
|
||||
* Set semaphore protocol attribute.
|
||||
*
|
||||
* One particularly important use of this furnction is when a semaphore
|
||||
* is used for inter-task communication like:
|
||||
*
|
||||
* TASK A TASK B
|
||||
* sem_init(sem, 0, 0);
|
||||
* sem_wait(sem);
|
||||
* sem_post(sem);
|
||||
* Awakens as holder
|
||||
*
|
||||
* In this case priority inheritance can interfere with the operation of
|
||||
* the semaphore. The problem is that when TASK A is restarted it is a
|
||||
* holder of the semaphore. However, it never calls sem_post(sem) so it
|
||||
* becomes *permanently* a holder of the semaphore and may have its
|
||||
* priority boosted when any other task tries to acquire the semaphore.
|
||||
*
|
||||
* The fix is to call sem_setprotocol(SEM_PRIO_NONE) immediately after
|
||||
* the sem_init() call so that there will be no priority inheritance
|
||||
* operations on this semaphore.
|
||||
*
|
||||
* Parameters:
|
||||
* sem - A pointer to the semaphore whose attributes are to be
|
||||
* modified
|
||||
* protocol - The new protocol to use
|
||||
*
|
||||
* Return Value:
|
||||
* 0 if successful. Otherwise, -1 is returned and the errno value is set
|
||||
* appropriately.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int sem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
{
|
||||
int errcode;
|
||||
|
||||
DEBUGASSERT(sem != NULL);
|
||||
|
||||
switch (protocol)
|
||||
{
|
||||
case SEM_PRIO_NONE:
|
||||
return OK;
|
||||
|
||||
case SEM_PRIO_INHERIT:
|
||||
case SEM_PRIO_PROTECT:
|
||||
errcode = ENOSYS;
|
||||
break;
|
||||
|
||||
default:
|
||||
errcode = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_PRIORITY_INHERITANCE */
|
||||
@@ -37,10 +37,10 @@
|
||||
|
||||
CSRCS += sem_destroy.c sem_wait.c sem_trywait.c sem_tickwait.c
|
||||
CSRCS += sem_timedwait.c sem_timeout.c sem_post.c sem_recover.c
|
||||
CSRCS += sem_reset.c sem_setprotocol.c sem_waitirq.c
|
||||
CSRCS += sem_reset.c sem_waitirq.c
|
||||
|
||||
ifeq ($(CONFIG_PRIORITY_INHERITANCE),y)
|
||||
CSRCS += sem_initialize.c sem_holder.c
|
||||
CSRCS += sem_initialize.c sem_holder.c sem_setprotocol.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SPINLOCK),y)
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
#include "semaphore/semaphore.h"
|
||||
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -95,7 +97,6 @@ int sem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
switch (protocol)
|
||||
{
|
||||
case SEM_PRIO_NONE:
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
/* Disable priority inheritance */
|
||||
|
||||
sem->flags |= PRIOINHERIT_FLAGS_DISABLE;
|
||||
@@ -103,16 +104,13 @@ int sem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
/* Remove any current holders */
|
||||
|
||||
sem_destroyholder(sem);
|
||||
#endif
|
||||
return OK;
|
||||
|
||||
case SEM_PRIO_INHERIT:
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
/* Enable priority inheritance (dangerous) */
|
||||
|
||||
sem->flags &= ~PRIOINHERIT_FLAGS_DISABLE;
|
||||
return OK;
|
||||
#endif
|
||||
|
||||
case SEM_PRIO_PROTECT:
|
||||
/* Not yet supported */
|
||||
@@ -128,3 +126,5 @@ int sem_setprotocol(FAR sem_t *sem, int protocol)
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PRIORITY_INHERITANCE */
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@
|
||||
"sem_destroy","semaphore.h","","int","FAR sem_t*"
|
||||
"sem_open","semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","FAR sem_t*","FAR const char*","int","..."
|
||||
"sem_post","semaphore.h","","int","FAR sem_t*"
|
||||
"sem_setprotocol","nuttx/semaphore.h","","int","FAR sem_t*","int"
|
||||
"sem_setprotocol","nuttx/semaphore.h","defined(CONFIG_PRIORITY_INHERITANCE)","int","FAR sem_t*","int"
|
||||
"sem_timedwait","semaphore.h","","int","FAR sem_t*","FAR const struct timespec *"
|
||||
"sem_trywait","semaphore.h","","int","FAR sem_t*"
|
||||
"sem_unlink","semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR const char*"
|
||||
|
||||
|
Reference in New Issue
Block a user