ducky: debug usb issues

This commit is contained in:
Reza Jelveh 2020-12-29 20:39:48 +08:00
parent f6f9d022db
commit 978a7c9233
3 changed files with 136 additions and 128 deletions

View File

@ -1,6 +1,5 @@
/* /*
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2019 /u/KeepItUnder
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -16,7 +15,7 @@
*/ */
/** /**
* @file templates/chconf.h * @file rt/templates/chconf.h
* @brief Configuration file template. * @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it * @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings. * contains the application specific kernel settings.
@ -44,7 +43,7 @@
* @note Allowed values are 16, 32 or 64 bits. * @note Allowed values are 16, 32 or 64 bits.
*/ */
#if !defined(CH_CFG_ST_RESOLUTION) #if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32 #define CH_CFG_ST_RESOLUTION 32
#endif #endif
/** /**
@ -53,7 +52,7 @@
* setting also defines the system tick time unit. * setting also defines the system tick time unit.
*/ */
#if !defined(CH_CFG_ST_FREQUENCY) #if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000 #define CH_CFG_ST_FREQUENCY 10000
#endif #endif
/** /**
@ -61,7 +60,7 @@
* @note Allowed values are 16, 32 or 64 bits. * @note Allowed values are 16, 32 or 64 bits.
*/ */
#if !defined(CH_CFG_INTERVALS_SIZE) #if !defined(CH_CFG_INTERVALS_SIZE)
#define CH_CFG_INTERVALS_SIZE 32 #define CH_CFG_INTERVALS_SIZE 32
#endif #endif
/** /**
@ -69,7 +68,7 @@
* @note Allowed values are 16 or 32 bits. * @note Allowed values are 16 or 32 bits.
*/ */
#if !defined(CH_CFG_TIME_TYPES_SIZE) #if !defined(CH_CFG_TIME_TYPES_SIZE)
#define CH_CFG_TIME_TYPES_SIZE 32 #define CH_CFG_TIME_TYPES_SIZE 32
#endif #endif
/** /**
@ -81,7 +80,7 @@
* this value. * this value.
*/ */
#if !defined(CH_CFG_ST_TIMEDELTA) #if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0 #define CH_CFG_ST_TIMEDELTA 0
#endif #endif
/** @} */ /** @} */
@ -307,7 +306,7 @@
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/ */
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE #define CH_CFG_USE_DYNAMIC FALSE
#endif #endif
/** @} */ /** @} */
@ -337,7 +336,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMCORE) #if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE #define CH_CFG_USE_MEMCORE TRUE
#endif #endif
/** /**
@ -352,7 +351,7 @@
* @note Requires @p CH_CFG_USE_MEMCORE. * @note Requires @p CH_CFG_USE_MEMCORE.
*/ */
#if !defined(CH_CFG_MEMCORE_SIZE) #if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0 #define CH_CFG_MEMCORE_SIZE 0
#endif #endif
/** /**
@ -375,7 +374,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_MEMPOOLS) #if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE #define CH_CFG_USE_MEMPOOLS FALSE
#endif #endif
/** /**
@ -386,7 +385,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_OBJ_FIFOS) #if !defined(CH_CFG_USE_OBJ_FIFOS)
#define CH_CFG_USE_OBJ_FIFOS FALSE #define CH_CFG_USE_OBJ_FIFOS FALSE
#endif #endif
/** /**
@ -397,7 +396,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_PIPES) #if !defined(CH_CFG_USE_PIPES)
#define CH_CFG_USE_PIPES FALSE #define CH_CFG_USE_PIPES FALSE
#endif #endif
/** /**
@ -408,7 +407,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(CH_CFG_USE_OBJ_CACHES) #if !defined(CH_CFG_USE_OBJ_CACHES)
#define CH_CFG_USE_OBJ_CACHES TRUE #define CH_CFG_USE_OBJ_CACHES FALSE
#endif #endif
/** /**
@ -450,7 +449,7 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_CFG_USE_FACTORY) #if !defined(CH_CFG_USE_FACTORY)
#define CH_CFG_USE_FACTORY FALSE #define CH_CFG_USE_FACTORY FALSE
#endif #endif
/** /**
@ -459,49 +458,49 @@
* pointer but this could have unintended side effects. * pointer but this could have unintended side effects.
*/ */
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
#endif #endif
/** /**
* @brief Enables the registry of generic objects. * @brief Enables the registry of generic objects.
*/ */
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE #define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
#endif #endif
/** /**
* @brief Enables factory for generic buffers. * @brief Enables factory for generic buffers.
*/ */
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE #define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
#endif #endif
/** /**
* @brief Enables factory for semaphores. * @brief Enables factory for semaphores.
*/ */
#if !defined(CH_CFG_FACTORY_SEMAPHORES) #if !defined(CH_CFG_FACTORY_SEMAPHORES)
#define CH_CFG_FACTORY_SEMAPHORES FALSE #define CH_CFG_FACTORY_SEMAPHORES FALSE
#endif #endif
/** /**
* @brief Enables factory for mailboxes. * @brief Enables factory for mailboxes.
*/ */
#if !defined(CH_CFG_FACTORY_MAILBOXES) #if !defined(CH_CFG_FACTORY_MAILBOXES)
#define CH_CFG_FACTORY_MAILBOXES FALSE #define CH_CFG_FACTORY_MAILBOXES FALSE
#endif #endif
/** /**
* @brief Enables factory for objects FIFOs. * @brief Enables factory for objects FIFOs.
*/ */
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) #if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#define CH_CFG_FACTORY_OBJ_FIFOS FALSE #define CH_CFG_FACTORY_OBJ_FIFOS FALSE
#endif #endif
/** /**
* @brief Enables factory for Pipes. * @brief Enables factory for Pipes.
*/ */
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
#define CH_CFG_FACTORY_PIPES FALSE #define CH_CFG_FACTORY_PIPES FALSE
#endif #endif
/** @} */ /** @} */
@ -530,7 +529,7 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) #if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE #define CH_DBG_SYSTEM_STATE_CHECK TRUE
#endif #endif
/** /**
@ -627,24 +626,23 @@
* @brief System structure extension. * @brief System structure extension.
* @details User fields added to the end of the @p ch_system_t structure. * @details User fields added to the end of the @p ch_system_t structure.
*/ */
#define CH_CFG_SYSTEM_EXTRA_FIELDS \ #define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
/* Add threads custom fields here.*/
/** /**
* @brief System initialization hook. * @brief System initialization hook.
* @details User initialization code added to the @p chSysInit() function * @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally. * just before interrupts are enabled globally.
*/ */
#define CH_CFG_SYSTEM_INIT_HOOK() { \ #define CH_CFG_SYSTEM_INIT_HOOK() \
/* Add threads initialization code here.*/ \ { \
} /* Add threads initialization code here.*/ \
}
/** /**
* @brief Threads descriptor structure extension. * @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure. * @details User fields added to the end of the @p thread_t structure.
*/ */
#define CH_CFG_THREAD_EXTRA_FIELDS \ #define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
/* Add threads custom fields here.*/
/** /**
* @brief Threads initialization hook. * @brief Threads initialization hook.
@ -653,39 +651,44 @@
* @note It is invoked from within @p _thread_init() and implicitly from all * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs. * the threads creation APIs.
*/ */
#define CH_CFG_THREAD_INIT_HOOK(tp) { \ #define CH_CFG_THREAD_INIT_HOOK(tp) \
/* Add threads initialization code here.*/ \ { \
} /* Add threads initialization code here.*/ \
}
/** /**
* @brief Threads finalization hook. * @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API. * @details User finalization code added to the @p chThdExit() API.
*/ */
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ #define CH_CFG_THREAD_EXIT_HOOK(tp) \
/* Add threads finalization code here.*/ \ { \
} /* Add threads finalization code here.*/ \
}
/** /**
* @brief Context switch hook. * @brief Context switch hook.
* @details This hook is invoked just before switching between threads. * @details This hook is invoked just before switching between threads.
*/ */
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
/* Context switch code here.*/ \ { \
} /* Context switch code here.*/ \
}
/** /**
* @brief ISR enter hook. * @brief ISR enter hook.
*/ */
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ #define CH_CFG_IRQ_PROLOGUE_HOOK() \
/* IRQ prologue code here.*/ \ { \
} /* IRQ prologue code here.*/ \
}
/** /**
* @brief ISR exit hook. * @brief ISR exit hook.
*/ */
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ #define CH_CFG_IRQ_EPILOGUE_HOOK() \
/* IRQ epilogue code here.*/ \ { \
} /* IRQ epilogue code here.*/ \
}
/** /**
* @brief Idle thread enter hook. * @brief Idle thread enter hook.
@ -693,9 +696,10 @@
* should be invoked from here. * should be invoked from here.
* @note This macro can be used to activate a power saving mode. * @note This macro can be used to activate a power saving mode.
*/ */
#define CH_CFG_IDLE_ENTER_HOOK() { \ #define CH_CFG_IDLE_ENTER_HOOK() \
/* Idle-enter code here.*/ \ { \
} /* Idle-enter code here.*/ \
}
/** /**
* @brief Idle thread leave hook. * @brief Idle thread leave hook.
@ -703,44 +707,49 @@
* should be invoked from here. * should be invoked from here.
* @note This macro can be used to deactivate a power saving mode. * @note This macro can be used to deactivate a power saving mode.
*/ */
#define CH_CFG_IDLE_LEAVE_HOOK() { \ #define CH_CFG_IDLE_LEAVE_HOOK() \
/* Idle-leave code here.*/ \ { \
} /* Idle-leave code here.*/ \
}
/** /**
* @brief Idle Loop hook. * @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop. * @details This hook is continuously invoked by the idle thread loop.
*/ */
#define CH_CFG_IDLE_LOOP_HOOK() { \ #define CH_CFG_IDLE_LOOP_HOOK() \
/* Idle loop code here.*/ \ { \
} /* Idle loop code here.*/ \
}
/** /**
* @brief System tick event hook. * @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately * @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue. * after processing the virtual timers queue.
*/ */
#define CH_CFG_SYSTEM_TICK_HOOK() { \ #define CH_CFG_SYSTEM_TICK_HOOK() \
/* System tick event code here.*/ \ { \
} /* System tick event code here.*/ \
}
/** /**
* @brief System halt hook. * @brief System halt hook.
* @details This hook is invoked in case to a system halting error before * @details This hook is invoked in case to a system halting error before
* the system is halted. * the system is halted.
*/ */
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ #define CH_CFG_SYSTEM_HALT_HOOK(reason) \
/* System halt code here.*/ \ { \
} /* System halt code here.*/ \
}
/** /**
* @brief Trace hook. * @brief Trace hook.
* @details This hook is invoked each time a new record is written in the * @details This hook is invoked each time a new record is written in the
* trace buffer. * trace buffer.
*/ */
#define CH_CFG_TRACE_HOOK(tep) { \ #define CH_CFG_TRACE_HOOK(tep) \
/* Trace code here.*/ \ { \
} /* Trace code here.*/ \
}
/** @} */ /** @} */
@ -748,6 +757,6 @@
/* Port-specific settings (override port settings defaulted in chcore.h). */ /* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/ /*===========================================================================*/
#endif /* CHCONF_H */ #endif /* CHCONF_H */
/** @} */ /** @} */

View File

@ -1,6 +1,5 @@
/* /*
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2019 /u/KeepItUnder
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -26,8 +25,8 @@
* @{ * @{
*/ */
#ifndef _HALCONF_H_ #ifndef HALCONF_H
#define _HALCONF_H_ #define HALCONF_H
#define _CHIBIOS_HAL_CONF_ #define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_0_ #define _CHIBIOS_HAL_CONF_VER_7_0_
@ -38,168 +37,168 @@
* @brief Enables the PAL subsystem. * @brief Enables the PAL subsystem.
*/ */
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE #define HAL_USE_PAL TRUE
#endif #endif
/** /**
* @brief Enables the ADC subsystem. * @brief Enables the ADC subsystem.
*/ */
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC FALSE #define HAL_USE_ADC FALSE
#endif #endif
/** /**
* @brief Enables the CAN subsystem. * @brief Enables the CAN subsystem.
*/ */
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN FALSE #define HAL_USE_CAN FALSE
#endif #endif
/** /**
* @brief Enables the cryptographic subsystem. * @brief Enables the cryptographic subsystem.
*/ */
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
#define HAL_USE_CRY FALSE #define HAL_USE_CRY FALSE
#endif #endif
/** /**
* @brief Enables the DAC subsystem. * @brief Enables the DAC subsystem.
*/ */
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
#define HAL_USE_DAC FALSE #define HAL_USE_DAC FALSE
#endif #endif
/** /**
* @brief Enables the EFlash subsystem. * @brief Enables the EFlash subsystem.
*/ */
#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__)
#define HAL_USE_EFL FALSE #define HAL_USE_EFL FALSE
#endif #endif
/** /**
* @brief Enables the GPT subsystem. * @brief Enables the GPT subsystem.
*/ */
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT FALSE #define HAL_USE_GPT FALSE
#endif #endif
/** /**
* @brief Enables the I2C subsystem. * @brief Enables the I2C subsystem.
*/ */
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C FALSE #define HAL_USE_I2C FALSE
#endif #endif
/** /**
* @brief Enables the I2S subsystem. * @brief Enables the I2S subsystem.
*/ */
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
#define HAL_USE_I2S FALSE #define HAL_USE_I2S FALSE
#endif #endif
/** /**
* @brief Enables the ICU subsystem. * @brief Enables the ICU subsystem.
*/ */
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU FALSE #define HAL_USE_ICU FALSE
#endif #endif
/** /**
* @brief Enables the MAC subsystem. * @brief Enables the MAC subsystem.
*/ */
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE #define HAL_USE_MAC FALSE
#endif #endif
/** /**
* @brief Enables the MMC_SPI subsystem. * @brief Enables the MMC_SPI subsystem.
*/ */
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI FALSE #define HAL_USE_MMC_SPI FALSE
#endif #endif
/** /**
* @brief Enables the PWM subsystem. * @brief Enables the PWM subsystem.
*/ */
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#endif #endif
/** /**
* @brief Enables the RTC subsystem. * @brief Enables the RTC subsystem.
*/ */
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC FALSE #define HAL_USE_RTC FALSE
#endif #endif
/** /**
* @brief Enables the SDC subsystem. * @brief Enables the SDC subsystem.
*/ */
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE #define HAL_USE_SDC FALSE
#endif #endif
/** /**
* @brief Enables the SERIAL subsystem. * @brief Enables the SERIAL subsystem.
*/ */
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL FALSE #define HAL_USE_SERIAL FALSE
#endif #endif
/** /**
* @brief Enables the SERIAL over USB subsystem. * @brief Enables the SERIAL over USB subsystem.
*/ */
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB FALSE #define HAL_USE_SERIAL_USB FALSE
#endif #endif
/** /**
* @brief Enables the SIO subsystem. * @brief Enables the SIO subsystem.
*/ */
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
#define HAL_USE_SIO FALSE #define HAL_USE_SIO FALSE
#endif #endif
/** /**
* @brief Enables the SPI subsystem. * @brief Enables the SPI subsystem.
*/ */
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI FALSE #define HAL_USE_SPI FALSE
#endif #endif
/** /**
* @brief Enables the TRNG subsystem. * @brief Enables the TRNG subsystem.
*/ */
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
#define HAL_USE_TRNG FALSE #define HAL_USE_TRNG FALSE
#endif #endif
/** /**
* @brief Enables the UART subsystem. * @brief Enables the UART subsystem.
*/ */
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) #if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE #define HAL_USE_UART FALSE
#endif #endif
/** /**
* @brief Enables the USB subsystem. * @brief Enables the USB subsystem.
*/ */
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB TRUE #define HAL_USE_USB TRUE
#endif #endif
/** /**
* @brief Enables the WDG subsystem. * @brief Enables the WDG subsystem.
*/ */
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
#define HAL_USE_WDG FALSE #define HAL_USE_WDG FALSE
#endif #endif
/** /**
* @brief Enables the WSPI subsystem. * @brief Enables the WSPI subsystem.
*/ */
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define HAL_USE_WSPI FALSE #define HAL_USE_WSPI FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -211,7 +210,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
#define PAL_USE_CALLBACKS FALSE #define PAL_USE_CALLBACKS FALSE
#endif #endif
/** /**
@ -219,7 +218,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
#define PAL_USE_WAIT FALSE #define PAL_USE_WAIT FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -231,7 +230,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE #define ADC_USE_WAIT TRUE
#endif #endif
/** /**
@ -239,7 +238,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE #define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -250,14 +249,14 @@
* @brief Sleep mode related APIs inclusion switch. * @brief Sleep mode related APIs inclusion switch.
*/ */
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE #define CAN_USE_SLEEP_MODE TRUE
#endif #endif
/** /**
* @brief Enforces the driver to use direct callbacks rather than OSAL events. * @brief Enforces the driver to use direct callbacks rather than OSAL events.
*/ */
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
#define CAN_ENFORCE_USE_CALLBACKS FALSE #define CAN_ENFORCE_USE_CALLBACKS FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -272,14 +271,14 @@
* @note Fall-back implementations may not be present for all algorithms. * @note Fall-back implementations may not be present for all algorithms.
*/ */
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
#define HAL_CRY_USE_FALLBACK FALSE #define HAL_CRY_USE_FALLBACK FALSE
#endif #endif
/** /**
* @brief Makes the driver forcibly use the fall-back implementations. * @brief Makes the driver forcibly use the fall-back implementations.
*/ */
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
#define HAL_CRY_ENFORCE_FALLBACK FALSE #define HAL_CRY_ENFORCE_FALLBACK FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -291,7 +290,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
#define DAC_USE_WAIT TRUE #define DAC_USE_WAIT TRUE
#endif #endif
/** /**
@ -299,7 +298,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define DAC_USE_MUTUAL_EXCLUSION TRUE #define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -310,7 +309,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus. * @brief Enables the mutual exclusion APIs on the I2C bus.
*/ */
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE #define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -321,14 +320,14 @@
* @brief Enables the zero-copy API. * @brief Enables the zero-copy API.
*/ */
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE #define MAC_USE_ZERO_COPY FALSE
#endif #endif
/** /**
* @brief Enables an event sources for incoming packets. * @brief Enables an event sources for incoming packets.
*/ */
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE #define MAC_USE_EVENTS TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -344,7 +343,7 @@
* use a DMA channel and heavily loads the CPU. * use a DMA channel and heavily loads the CPU.
*/ */
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE #define MMC_NICE_WAITING TRUE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -356,7 +355,7 @@
* @note Attempts are performed at 10mS intervals. * @note Attempts are performed at 10mS intervals.
*/ */
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100 #define SDC_INIT_RETRY 100
#endif #endif
/** /**
@ -365,7 +364,7 @@
* at @p FALSE. * at @p FALSE.
*/ */
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE #define SDC_MMC_SUPPORT FALSE
#endif #endif
/** /**
@ -375,21 +374,21 @@
* lower priority, this may slow down the driver a bit however. * lower priority, this may slow down the driver a bit however.
*/ */
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE #define SDC_NICE_WAITING TRUE
#endif #endif
/** /**
* @brief OCR initialization constant for V20 cards. * @brief OCR initialization constant for V20 cards.
*/ */
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
#define SDC_INIT_OCR_V20 0x50FF8000U #define SDC_INIT_OCR_V20 0x50FF8000U
#endif #endif
/** /**
* @brief OCR initialization constant for non-V20 cards. * @brief OCR initialization constant for non-V20 cards.
*/ */
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
#define SDC_INIT_OCR 0x80100000U #define SDC_INIT_OCR 0x80100000U
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -402,7 +401,7 @@
* default configuration. * default configuration.
*/ */
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400 #define SERIAL_DEFAULT_BITRATE 38400
#endif #endif
/** /**
@ -413,7 +412,7 @@
* buffers. * buffers.
*/ */
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16 #define SERIAL_BUFFERS_SIZE 16
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -428,7 +427,7 @@
* buffers. * buffers.
*/ */
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256 #define SERIAL_USB_BUFFERS_SIZE 256
#endif #endif
/** /**
@ -436,7 +435,7 @@
* @note The default is 2 buffers. * @note The default is 2 buffers.
*/ */
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2 #define SERIAL_USB_BUFFERS_NUMBER 2
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -448,7 +447,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE #define SPI_USE_WAIT TRUE
#endif #endif
/** /**
@ -456,7 +455,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE #define SPI_USE_CIRCULAR FALSE
#endif #endif
/** /**
@ -464,7 +463,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION TRUE #define SPI_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
/** /**
@ -472,7 +471,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -484,7 +483,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE #define UART_USE_WAIT FALSE
#endif #endif
/** /**
@ -492,7 +491,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE #define UART_USE_MUTUAL_EXCLUSION FALSE
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -516,7 +515,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
#define WSPI_USE_WAIT TRUE #define WSPI_USE_WAIT TRUE
#endif #endif
/** /**
@ -524,9 +523,9 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define WSPI_USE_MUTUAL_EXCLUSION TRUE #define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif #endif
#endif /* _HALCONF_H_ */ #endif /* HALCONF_H */
/** @} */ /** @} */

View File

@ -15,8 +15,8 @@ MCU_LDSCRIPT = NUC123xD4xx0
# startup code to use # startup code to use
MCU_STARTUP = NUC123 MCU_STARTUP = NUC123
# BOARD = NUC123SD4AN0 BOARD = NUC123SD4AN0
BOARD = NUTINY-SDK-NUC123-V2.0 # BOARD = NUTINY-SDK-NUC123-V2.0
# NUC123 series is Cortex M0 # NUC123 series is Cortex M0
MCU = cortex-m0 MCU = cortex-m0
@ -39,7 +39,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes DIP_SWITCH_ENABLE = no
# Enter lower-power sleep mode when on the ChibiOS idle thread # Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE