diff options
| author | James Young <xxiinophobia@yahoo.com> | 2020-02-29 12:00:00 -0800 |
|---|---|---|
| committer | James Young <xxiinophobia@yahoo.com> | 2020-02-29 11:59:30 -0800 |
| commit | 26eef35f07698d23aafae90e1c230b52e100a334 (patch) | |
| tree | eb8e43fc58ca55788e6e89430af0db55ea79e324 /keyboards/cannonkeys/satisfaction75 | |
| parent | 85041ff05bf0e5f4ff4535caf6e638491a5614c8 (diff) | |
| download | qmk_firmware-26eef35f07698d23aafae90e1c230b52e100a334.tar.gz qmk_firmware-26eef35f07698d23aafae90e1c230b52e100a334.zip | |
2020 February 29 Breaking Changes Update (#8064)
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75')
6 files changed, 703 insertions, 162 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c index d9f7bc329..7c09bd997 100644 --- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio |
| 3 | 3 | ||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
| @@ -20,14 +20,76 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include "hal.h" | 22 | #include "hal.h" |
| 23 | #include "stm32_gpio.h" | ||
| 24 | |||
| 25 | /*===========================================================================*/ | ||
| 26 | /* Driver local definitions. */ | ||
| 27 | /*===========================================================================*/ | ||
| 28 | |||
| 29 | /*===========================================================================*/ | ||
| 30 | /* Driver exported variables. */ | ||
| 31 | /*===========================================================================*/ | ||
| 32 | |||
| 33 | /*===========================================================================*/ | ||
| 34 | /* Driver local variables and types. */ | ||
| 35 | /*===========================================================================*/ | ||
| 36 | |||
| 37 | /** | ||
| 38 | * @brief Type of STM32 GPIO port setup. | ||
| 39 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef struct { | ||
| 54 | #if STM32_HAS_GPIOA || defined(__DOXYGEN__) | ||
| 55 | gpio_setup_t PAData; | ||
| 56 | #endif | ||
| 57 | #if STM32_HAS_GPIOB || defined(__DOXYGEN__) | ||
| 58 | gpio_setup_t PBData; | ||
| 59 | #endif | ||
| 60 | #if STM32_HAS_GPIOC || defined(__DOXYGEN__) | ||
| 61 | gpio_setup_t PCData; | ||
| 62 | #endif | ||
| 63 | #if STM32_HAS_GPIOD || defined(__DOXYGEN__) | ||
| 64 | gpio_setup_t PDData; | ||
| 65 | #endif | ||
| 66 | #if STM32_HAS_GPIOE || defined(__DOXYGEN__) | ||
| 67 | gpio_setup_t PEData; | ||
| 68 | #endif | ||
| 69 | #if STM32_HAS_GPIOF || defined(__DOXYGEN__) | ||
| 70 | gpio_setup_t PFData; | ||
| 71 | #endif | ||
| 72 | #if STM32_HAS_GPIOG || defined(__DOXYGEN__) | ||
| 73 | gpio_setup_t PGData; | ||
| 74 | #endif | ||
| 75 | #if STM32_HAS_GPIOH || defined(__DOXYGEN__) | ||
| 76 | gpio_setup_t PHData; | ||
| 77 | #endif | ||
| 78 | #if STM32_HAS_GPIOI || defined(__DOXYGEN__) | ||
| 79 | gpio_setup_t PIData; | ||
| 80 | #endif | ||
| 81 | #if STM32_HAS_GPIOJ || defined(__DOXYGEN__) | ||
| 82 | gpio_setup_t PJData; | ||
| 83 | #endif | ||
| 84 | #if STM32_HAS_GPIOK || defined(__DOXYGEN__) | ||
| 85 | gpio_setup_t PKData; | ||
| 86 | #endif | ||
| 87 | } gpio_config_t; | ||
| 23 | 88 | ||
| 24 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
| 25 | /** | 89 | /** |
| 26 | * @brief PAL setup. | 90 | * @brief STM32 GPIO static initialization data. |
| 27 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
| 28 | * This variable is used by the HAL when initializing the PAL driver. | ||
| 29 | */ | 91 | */ |
| 30 | const PALConfig pal_default_config = { | 92 | static const gpio_config_t gpio_default_config = { |
| 31 | #if STM32_HAS_GPIOA | 93 | #if STM32_HAS_GPIOA |
| 32 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, | 94 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, |
| 33 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, | 95 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, |
| @@ -62,23 +124,118 @@ const PALConfig pal_default_config = { | |||
| 62 | #endif | 124 | #endif |
| 63 | #if STM32_HAS_GPIOI | 125 | #if STM32_HAS_GPIOI |
| 64 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, | 126 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, |
| 65 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} | 127 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, |
| 128 | #endif | ||
| 129 | #if STM32_HAS_GPIOJ | ||
| 130 | {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, | ||
| 131 | VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, | ||
| 132 | #endif | ||
| 133 | #if STM32_HAS_GPIOK | ||
| 134 | {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, | ||
| 135 | VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} | ||
| 66 | #endif | 136 | #endif |
| 67 | }; | 137 | }; |
| 138 | |||
| 139 | /*===========================================================================*/ | ||
| 140 | /* Driver local functions. */ | ||
| 141 | /*===========================================================================*/ | ||
| 142 | |||
| 143 | static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { | ||
| 144 | |||
| 145 | gpiop->OTYPER = config->otyper; | ||
| 146 | gpiop->OSPEEDR = config->ospeedr; | ||
| 147 | gpiop->PUPDR = config->pupdr; | ||
| 148 | gpiop->ODR = config->odr; | ||
| 149 | gpiop->AFRL = config->afrl; | ||
| 150 | gpiop->AFRH = config->afrh; | ||
| 151 | gpiop->MODER = config->moder; | ||
| 152 | } | ||
| 153 | |||
| 154 | static void stm32_gpio_init(void) { | ||
| 155 | |||
| 156 | /* Enabling GPIO-related clocks, the mask comes from the | ||
| 157 | registry header file.*/ | ||
| 158 | rccResetAHB(STM32_GPIO_EN_MASK); | ||
| 159 | rccEnableAHB(STM32_GPIO_EN_MASK, true); | ||
| 160 | |||
| 161 | /* Initializing all the defined GPIO ports.*/ | ||
| 162 | #if STM32_HAS_GPIOA | ||
| 163 | gpio_init(GPIOA, &gpio_default_config.PAData); | ||
| 164 | #endif | ||
| 165 | #if STM32_HAS_GPIOB | ||
| 166 | gpio_init(GPIOB, &gpio_default_config.PBData); | ||
| 68 | #endif | 167 | #endif |
| 168 | #if STM32_HAS_GPIOC | ||
| 169 | gpio_init(GPIOC, &gpio_default_config.PCData); | ||
| 170 | #endif | ||
| 171 | #if STM32_HAS_GPIOD | ||
| 172 | gpio_init(GPIOD, &gpio_default_config.PDData); | ||
| 173 | #endif | ||
| 174 | #if STM32_HAS_GPIOE | ||
| 175 | gpio_init(GPIOE, &gpio_default_config.PEData); | ||
| 176 | #endif | ||
| 177 | #if STM32_HAS_GPIOF | ||
| 178 | gpio_init(GPIOF, &gpio_default_config.PFData); | ||
| 179 | #endif | ||
| 180 | #if STM32_HAS_GPIOG | ||
| 181 | gpio_init(GPIOG, &gpio_default_config.PGData); | ||
| 182 | #endif | ||
| 183 | #if STM32_HAS_GPIOH | ||
| 184 | gpio_init(GPIOH, &gpio_default_config.PHData); | ||
| 185 | #endif | ||
| 186 | #if STM32_HAS_GPIOI | ||
| 187 | gpio_init(GPIOI, &gpio_default_config.PIData); | ||
| 188 | #endif | ||
| 189 | #if STM32_HAS_GPIOJ | ||
| 190 | gpio_init(GPIOJ, &gpio_default_config.PJData); | ||
| 191 | #endif | ||
| 192 | #if STM32_HAS_GPIOK | ||
| 193 | gpio_init(GPIOK, &gpio_default_config.PKData); | ||
| 194 | #endif | ||
| 195 | } | ||
| 196 | |||
| 197 | /*===========================================================================*/ | ||
| 198 | /* Driver interrupt handlers. */ | ||
| 199 | /*===========================================================================*/ | ||
| 69 | 200 | ||
| 70 | void enter_bootloader_mode_if_requested(void); | 201 | /*===========================================================================*/ |
| 202 | /* Driver exported functions. */ | ||
| 203 | /*===========================================================================*/ | ||
| 71 | 204 | ||
| 72 | /** | 205 | /** |
| 73 | * @brief Early initialization code. | 206 | * @brief Early initialization code. |
| 74 | * @details This initialization must be performed just after stack setup | 207 | * @details GPIO ports and system clocks are initialized before everything |
| 75 | * and before any other initialization. | 208 | * else. |
| 76 | */ | 209 | */ |
| 77 | void __early_init(void) { | 210 | void __early_init(void) { |
| 211 | extern void enter_bootloader_mode_if_requested(void); | ||
| 78 | enter_bootloader_mode_if_requested(); | 212 | enter_bootloader_mode_if_requested(); |
| 213 | stm32_gpio_init(); | ||
| 79 | stm32_clock_init(); | 214 | stm32_clock_init(); |
| 80 | } | 215 | } |
| 81 | 216 | ||
| 217 | #if HAL_USE_SDC || defined(__DOXYGEN__) | ||
| 218 | /** | ||
| 219 | * @brief SDC card detection. | ||
| 220 | */ | ||
| 221 | bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { | ||
| 222 | |||
| 223 | (void)sdcp; | ||
| 224 | /* TODO: Fill the implementation.*/ | ||
| 225 | return true; | ||
| 226 | } | ||
| 227 | |||
| 228 | /** | ||
| 229 | * @brief SDC card write protection detection. | ||
| 230 | */ | ||
| 231 | bool sdc_lld_is_write_protected(SDCDriver *sdcp) { | ||
| 232 | |||
| 233 | (void)sdcp; | ||
| 234 | /* TODO: Fill the implementation.*/ | ||
| 235 | return false; | ||
| 236 | } | ||
| 237 | #endif /* HAL_USE_SDC */ | ||
| 238 | |||
| 82 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) | 239 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) |
| 83 | /** | 240 | /** |
| 84 | * @brief MMC_SPI card detection. | 241 | * @brief MMC_SPI card detection. |
diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h index de3a93d1c..57636d1f1 100644 --- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h | |||
| @@ -22,6 +22,10 @@ | |||
| 22 | #ifndef BOARD_H | 22 | #ifndef BOARD_H |
| 23 | #define BOARD_H | 23 | #define BOARD_H |
| 24 | 24 | ||
| 25 | /*===========================================================================*/ | ||
| 26 | /* Driver constants. */ | ||
| 27 | /*===========================================================================*/ | ||
| 28 | |||
| 25 | /* | 29 | /* |
| 26 | * Setup for ST STM32F072B-Discovery board. | 30 | * Setup for ST STM32F072B-Discovery board. |
| 27 | */ | 31 | */ |
| @@ -166,11 +170,9 @@ | |||
| 166 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) | 170 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) |
| 167 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | 171 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) |
| 168 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | 172 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) |
| 169 | |||
| 170 | #define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) | 173 | #define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) |
| 171 | #define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) | 174 | #define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) |
| 172 | #define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) | 175 | #define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) |
| 173 | |||
| 174 | #define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) | 176 | #define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) |
| 175 | #define LINE_LED_RED PAL_LINE(GPIOC, 6U) | 177 | #define LINE_LED_RED PAL_LINE(GPIOC, 6U) |
| 176 | #define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) | 178 | #define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) |
| @@ -178,11 +180,24 @@ | |||
| 178 | #define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) | 180 | #define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) |
| 179 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | 181 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) |
| 180 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | 182 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) |
| 183 | #define LINE_OSC_IN PAL_LINE(GPIOF, 0U) | ||
| 184 | #define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) | ||
| 181 | 185 | ||
| 186 | /*===========================================================================*/ | ||
| 187 | /* Driver pre-compile time settings. */ | ||
| 188 | /*===========================================================================*/ | ||
| 182 | 189 | ||
| 190 | /*===========================================================================*/ | ||
| 191 | /* Derived constants and error checks. */ | ||
| 192 | /*===========================================================================*/ | ||
| 183 | 193 | ||
| 184 | #define LINE_OSC_IN PAL_LINE(GPIOF, 0U) | 194 | /*===========================================================================*/ |
| 185 | #define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) | 195 | /* Driver data structures and types. */ |
| 196 | /*===========================================================================*/ | ||
| 197 | |||
| 198 | /*===========================================================================*/ | ||
| 199 | /* Driver macros. */ | ||
| 200 | /*===========================================================================*/ | ||
| 186 | 201 | ||
| 187 | /* | 202 | /* |
| 188 | * I/O ports initial setup, this configuration is established soon after reset | 203 | * I/O ports initial setup, this configuration is established soon after reset |
| @@ -908,6 +923,9 @@ | |||
| 908 | PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ | 923 | PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ |
| 909 | PIN_AFIO_AF(GPIOF_PIN15, 0U)) | 924 | PIN_AFIO_AF(GPIOF_PIN15, 0U)) |
| 910 | 925 | ||
| 926 | /*===========================================================================*/ | ||
| 927 | /* External declarations. */ | ||
| 928 | /*===========================================================================*/ | ||
| 911 | 929 | ||
| 912 | #if !defined(_FROM_ASM_) | 930 | #if !defined(_FROM_ASM_) |
| 913 | #ifdef __cplusplus | 931 | #ifdef __cplusplus |
diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h index 89388dd5a..4640ff533 100644 --- a/keyboards/cannonkeys/satisfaction75/chconf.h +++ b/keyboards/cannonkeys/satisfaction75/chconf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio |
| 3 | 3 | ||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
| @@ -15,7 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| 18 | * @file templates/chconf.h | 18 | * @file rt/templates/chconf.h |
| 19 | * @brief Configuration file template. | 19 | * @brief Configuration file template. |
| 20 | * @details A copy of this file must be placed in each project directory, it | 20 | * @details A copy of this file must be placed in each project directory, it |
| 21 | * contains the application specific kernel settings. | 21 | * contains the application specific kernel settings. |
| @@ -29,6 +29,7 @@ | |||
| 29 | #define CHCONF_H | 29 | #define CHCONF_H |
| 30 | 30 | ||
| 31 | #define _CHIBIOS_RT_CONF_ | 31 | #define _CHIBIOS_RT_CONF_ |
| 32 | #define _CHIBIOS_RT_CONF_VER_6_0_ | ||
| 32 | 33 | ||
| 33 | /*===========================================================================*/ | 34 | /*===========================================================================*/ |
| 34 | /** | 35 | /** |
| @@ -41,14 +42,34 @@ | |||
| 41 | * @brief System time counter resolution. | 42 | * @brief System time counter resolution. |
| 42 | * @note Allowed values are 16 or 32 bits. | 43 | * @note Allowed values are 16 or 32 bits. |
| 43 | */ | 44 | */ |
| 45 | #if !defined(CH_CFG_ST_RESOLUTION) | ||
| 44 | #define CH_CFG_ST_RESOLUTION 32 | 46 | #define CH_CFG_ST_RESOLUTION 32 |
| 47 | #endif | ||
| 45 | 48 | ||
| 46 | /** | 49 | /** |
| 47 | * @brief System tick frequency. | 50 | * @brief System tick frequency. |
| 48 | * @details Frequency of the system timer that drives the system ticks. This | 51 | * @details Frequency of the system timer that drives the system ticks. This |
| 49 | * setting also defines the system tick time unit. | 52 | * setting also defines the system tick time unit. |
| 50 | */ | 53 | */ |
| 54 | #if !defined(CH_CFG_ST_FREQUENCY) | ||
| 51 | #define CH_CFG_ST_FREQUENCY 10000 | 55 | #define CH_CFG_ST_FREQUENCY 10000 |
| 56 | #endif | ||
| 57 | |||
| 58 | /** | ||
| 59 | * @brief Time intervals data size. | ||
| 60 | * @note Allowed values are 16, 32 or 64 bits. | ||
| 61 | */ | ||
| 62 | #if !defined(CH_CFG_INTERVALS_SIZE) | ||
| 63 | #define CH_CFG_INTERVALS_SIZE 32 | ||
| 64 | #endif | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @brief Time types data size. | ||
| 68 | * @note Allowed values are 16 or 32 bits. | ||
| 69 | */ | ||
| 70 | #if !defined(CH_CFG_TIME_TYPES_SIZE) | ||
| 71 | #define CH_CFG_TIME_TYPES_SIZE 32 | ||
| 72 | #endif | ||
| 52 | 73 | ||
| 53 | /** | 74 | /** |
| 54 | * @brief Time delta constant for the tick-less mode. | 75 | * @brief Time delta constant for the tick-less mode. |
| @@ -58,7 +79,9 @@ | |||
| 58 | * The value one is not valid, timeouts are rounded up to | 79 | * The value one is not valid, timeouts are rounded up to |
| 59 | * this value. | 80 | * this value. |
| 60 | */ | 81 | */ |
| 82 | #if !defined(CH_CFG_ST_TIMEDELTA) | ||
| 61 | #define CH_CFG_ST_TIMEDELTA 2 | 83 | #define CH_CFG_ST_TIMEDELTA 2 |
| 84 | #endif | ||
| 62 | 85 | ||
| 63 | /** @} */ | 86 | /** @} */ |
| 64 | 87 | ||
| @@ -81,7 +104,9 @@ | |||
| 81 | * @note The round robin preemption is not supported in tickless mode and | 104 | * @note The round robin preemption is not supported in tickless mode and |
| 82 | * must be set to zero in that case. | 105 | * must be set to zero in that case. |
| 83 | */ | 106 | */ |
| 107 | #if !defined(CH_CFG_TIME_QUANTUM) | ||
| 84 | #define CH_CFG_TIME_QUANTUM 0 | 108 | #define CH_CFG_TIME_QUANTUM 0 |
| 109 | #endif | ||
| 85 | 110 | ||
| 86 | /** | 111 | /** |
| 87 | * @brief Managed RAM size. | 112 | * @brief Managed RAM size. |
| @@ -94,7 +119,9 @@ | |||
| 94 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | 119 | * provide the @p __heap_base__ and @p __heap_end__ symbols. |
| 95 | * @note Requires @p CH_CFG_USE_MEMCORE. | 120 | * @note Requires @p CH_CFG_USE_MEMCORE. |
| 96 | */ | 121 | */ |
| 122 | #if !defined(CH_CFG_MEMCORE_SIZE) | ||
| 97 | #define CH_CFG_MEMCORE_SIZE 0 | 123 | #define CH_CFG_MEMCORE_SIZE 0 |
| 124 | #endif | ||
| 98 | 125 | ||
| 99 | /** | 126 | /** |
| 100 | * @brief Idle thread automatic spawn suppression. | 127 | * @brief Idle thread automatic spawn suppression. |
| @@ -103,7 +130,9 @@ | |||
| 103 | * function becomes the idle thread and must implement an | 130 | * function becomes the idle thread and must implement an |
| 104 | * infinite loop. | 131 | * infinite loop. |
| 105 | */ | 132 | */ |
| 133 | #if !defined(CH_CFG_NO_IDLE_THREAD) | ||
| 106 | #define CH_CFG_NO_IDLE_THREAD FALSE | 134 | #define CH_CFG_NO_IDLE_THREAD FALSE |
| 135 | #endif | ||
| 107 | 136 | ||
| 108 | /** @} */ | 137 | /** @} */ |
| 109 | 138 | ||
| @@ -122,7 +151,9 @@ | |||
| 122 | * @note This is not related to the compiler optimization options. | 151 | * @note This is not related to the compiler optimization options. |
| 123 | * @note The default is @p TRUE. | 152 | * @note The default is @p TRUE. |
| 124 | */ | 153 | */ |
| 154 | #if !defined(CH_CFG_OPTIMIZE_SPEED) | ||
| 125 | #define CH_CFG_OPTIMIZE_SPEED FALSE | 155 | #define CH_CFG_OPTIMIZE_SPEED FALSE |
| 156 | #endif | ||
| 126 | 157 | ||
| 127 | /** @} */ | 158 | /** @} */ |
| 128 | 159 | ||
| @@ -140,7 +171,9 @@ | |||
| 140 | * | 171 | * |
| 141 | * @note The default is @p TRUE. | 172 | * @note The default is @p TRUE. |
| 142 | */ | 173 | */ |
| 174 | #if !defined(CH_CFG_USE_TM) | ||
| 143 | #define CH_CFG_USE_TM FALSE | 175 | #define CH_CFG_USE_TM FALSE |
| 176 | #endif | ||
| 144 | 177 | ||
| 145 | /** | 178 | /** |
| 146 | * @brief Threads registry APIs. | 179 | * @brief Threads registry APIs. |
| @@ -148,7 +181,9 @@ | |||
| 148 | * | 181 | * |
| 149 | * @note The default is @p TRUE. | 182 | * @note The default is @p TRUE. |
| 150 | */ | 183 | */ |
| 184 | #if !defined(CH_CFG_USE_REGISTRY) | ||
| 151 | #define CH_CFG_USE_REGISTRY TRUE | 185 | #define CH_CFG_USE_REGISTRY TRUE |
| 186 | #endif | ||
| 152 | 187 | ||
| 153 | /** | 188 | /** |
| 154 | * @brief Threads synchronization APIs. | 189 | * @brief Threads synchronization APIs. |
| @@ -157,7 +192,9 @@ | |||
| 157 | * | 192 | * |
| 158 | * @note The default is @p TRUE. | 193 | * @note The default is @p TRUE. |
| 159 | */ | 194 | */ |
| 195 | #if !defined(CH_CFG_USE_WAITEXIT) | ||
| 160 | #define CH_CFG_USE_WAITEXIT TRUE | 196 | #define CH_CFG_USE_WAITEXIT TRUE |
| 197 | #endif | ||
| 161 | 198 | ||
| 162 | /** | 199 | /** |
| 163 | * @brief Semaphores APIs. | 200 | * @brief Semaphores APIs. |
| @@ -165,7 +202,9 @@ | |||
| 165 | * | 202 | * |
| 166 | * @note The default is @p TRUE. | 203 | * @note The default is @p TRUE. |
| 167 | */ | 204 | */ |
| 205 | #if !defined(CH_CFG_USE_SEMAPHORES) | ||
| 168 | #define CH_CFG_USE_SEMAPHORES TRUE | 206 | #define CH_CFG_USE_SEMAPHORES TRUE |
| 207 | #endif | ||
| 169 | 208 | ||
| 170 | /** | 209 | /** |
| 171 | * @brief Semaphores queuing mode. | 210 | * @brief Semaphores queuing mode. |
| @@ -176,7 +215,9 @@ | |||
| 176 | * requirements. | 215 | * requirements. |
| 177 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 216 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
| 178 | */ | 217 | */ |
| 218 | #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) | ||
| 179 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | 219 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
| 220 | #endif | ||
| 180 | 221 | ||
| 181 | /** | 222 | /** |
| 182 | * @brief Mutexes APIs. | 223 | * @brief Mutexes APIs. |
| @@ -184,7 +225,9 @@ | |||
| 184 | * | 225 | * |
| 185 | * @note The default is @p TRUE. | 226 | * @note The default is @p TRUE. |
| 186 | */ | 227 | */ |
| 228 | #if !defined(CH_CFG_USE_MUTEXES) | ||
| 187 | #define CH_CFG_USE_MUTEXES TRUE | 229 | #define CH_CFG_USE_MUTEXES TRUE |
| 230 | #endif | ||
| 188 | 231 | ||
| 189 | /** | 232 | /** |
| 190 | * @brief Enables recursive behavior on mutexes. | 233 | * @brief Enables recursive behavior on mutexes. |
| @@ -194,7 +237,9 @@ | |||
| 194 | * @note The default is @p FALSE. | 237 | * @note The default is @p FALSE. |
| 195 | * @note Requires @p CH_CFG_USE_MUTEXES. | 238 | * @note Requires @p CH_CFG_USE_MUTEXES. |
| 196 | */ | 239 | */ |
| 240 | #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) | ||
| 197 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | 241 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
| 242 | #endif | ||
| 198 | 243 | ||
| 199 | /** | 244 | /** |
| 200 | * @brief Conditional Variables APIs. | 245 | * @brief Conditional Variables APIs. |
| @@ -204,7 +249,9 @@ | |||
| 204 | * @note The default is @p TRUE. | 249 | * @note The default is @p TRUE. |
| 205 | * @note Requires @p CH_CFG_USE_MUTEXES. | 250 | * @note Requires @p CH_CFG_USE_MUTEXES. |
| 206 | */ | 251 | */ |
| 252 | #if !defined(CH_CFG_USE_CONDVARS) | ||
| 207 | #define CH_CFG_USE_CONDVARS TRUE | 253 | #define CH_CFG_USE_CONDVARS TRUE |
| 254 | #endif | ||
| 208 | 255 | ||
| 209 | /** | 256 | /** |
| 210 | * @brief Conditional Variables APIs with timeout. | 257 | * @brief Conditional Variables APIs with timeout. |
| @@ -214,7 +261,9 @@ | |||
| 214 | * @note The default is @p TRUE. | 261 | * @note The default is @p TRUE. |
| 215 | * @note Requires @p CH_CFG_USE_CONDVARS. | 262 | * @note Requires @p CH_CFG_USE_CONDVARS. |
| 216 | */ | 263 | */ |
| 264 | #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) | ||
| 217 | #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | 265 | #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE |
| 266 | #endif | ||
| 218 | 267 | ||
| 219 | /** | 268 | /** |
| 220 | * @brief Events Flags APIs. | 269 | * @brief Events Flags APIs. |
| @@ -222,7 +271,9 @@ | |||
| 222 | * | 271 | * |
| 223 | * @note The default is @p TRUE. | 272 | * @note The default is @p TRUE. |
| 224 | */ | 273 | */ |
| 274 | #if !defined(CH_CFG_USE_EVENTS) | ||
| 225 | #define CH_CFG_USE_EVENTS TRUE | 275 | #define CH_CFG_USE_EVENTS TRUE |
| 276 | #endif | ||
| 226 | 277 | ||
| 227 | /** | 278 | /** |
| 228 | * @brief Events Flags APIs with timeout. | 279 | * @brief Events Flags APIs with timeout. |
| @@ -232,7 +283,9 @@ | |||
| 232 | * @note The default is @p TRUE. | 283 | * @note The default is @p TRUE. |
| 233 | * @note Requires @p CH_CFG_USE_EVENTS. | 284 | * @note Requires @p CH_CFG_USE_EVENTS. |
| 234 | */ | 285 | */ |
| 286 | #if !defined(CH_CFG_USE_EVENTS_TIMEOUT) | ||
| 235 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | 287 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
| 288 | #endif | ||
| 236 | 289 | ||
| 237 | /** | 290 | /** |
| 238 | * @brief Synchronous Messages APIs. | 291 | * @brief Synchronous Messages APIs. |
| @@ -241,7 +294,9 @@ | |||
| 241 | * | 294 | * |
| 242 | * @note The default is @p TRUE. | 295 | * @note The default is @p TRUE. |
| 243 | */ | 296 | */ |
| 297 | #if !defined(CH_CFG_USE_MESSAGES) | ||
| 244 | #define CH_CFG_USE_MESSAGES TRUE | 298 | #define CH_CFG_USE_MESSAGES TRUE |
| 299 | #endif | ||
| 245 | 300 | ||
| 246 | /** | 301 | /** |
| 247 | * @brief Synchronous Messages queuing mode. | 302 | * @brief Synchronous Messages queuing mode. |
| @@ -252,7 +307,9 @@ | |||
| 252 | * requirements. | 307 | * requirements. |
| 253 | * @note Requires @p CH_CFG_USE_MESSAGES. | 308 | * @note Requires @p CH_CFG_USE_MESSAGES. |
| 254 | */ | 309 | */ |
| 310 | #if !defined(CH_CFG_USE_MESSAGES_PRIORITY) | ||
| 255 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | 311 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
| 312 | #endif | ||
| 256 | 313 | ||
| 257 | /** | 314 | /** |
| 258 | * @brief Mailboxes APIs. | 315 | * @brief Mailboxes APIs. |
| @@ -262,7 +319,9 @@ | |||
| 262 | * @note The default is @p TRUE. | 319 | * @note The default is @p TRUE. |
| 263 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | 320 | * @note Requires @p CH_CFG_USE_SEMAPHORES. |
| 264 | */ | 321 | */ |
| 322 | #if !defined(CH_CFG_USE_MAILBOXES) | ||
| 265 | #define CH_CFG_USE_MAILBOXES TRUE | 323 | #define CH_CFG_USE_MAILBOXES TRUE |
| 324 | #endif | ||
| 266 | 325 | ||
| 267 | /** | 326 | /** |
| 268 | * @brief Core Memory Manager APIs. | 327 | * @brief Core Memory Manager APIs. |
| @@ -271,7 +330,9 @@ | |||
| 271 | * | 330 | * |
| 272 | * @note The default is @p TRUE. | 331 | * @note The default is @p TRUE. |
| 273 | */ | 332 | */ |
| 333 | #if !defined(CH_CFG_USE_MEMCORE) | ||
| 274 | #define CH_CFG_USE_MEMCORE FALSE | 334 | #define CH_CFG_USE_MEMCORE FALSE |
| 335 | #endif | ||
| 275 | 336 | ||
| 276 | /** | 337 | /** |
| 277 | * @brief Heap Allocator APIs. | 338 | * @brief Heap Allocator APIs. |
| @@ -283,7 +344,9 @@ | |||
| 283 | * @p CH_CFG_USE_SEMAPHORES. | 344 | * @p CH_CFG_USE_SEMAPHORES. |
| 284 | * @note Mutexes are recommended. | 345 | * @note Mutexes are recommended. |
| 285 | */ | 346 | */ |
| 347 | #if !defined(CH_CFG_USE_HEAP) | ||
| 286 | #define CH_CFG_USE_HEAP FALSE | 348 | #define CH_CFG_USE_HEAP FALSE |
| 349 | #endif | ||
| 287 | 350 | ||
| 288 | /** | 351 | /** |
| 289 | * @brief Memory Pools Allocator APIs. | 352 | * @brief Memory Pools Allocator APIs. |
| @@ -292,7 +355,31 @@ | |||
| 292 | * | 355 | * |
| 293 | * @note The default is @p TRUE. | 356 | * @note The default is @p TRUE. |
| 294 | */ | 357 | */ |
| 358 | #if !defined(CH_CFG_USE_MEMPOOLS) | ||
| 295 | #define CH_CFG_USE_MEMPOOLS FALSE | 359 | #define CH_CFG_USE_MEMPOOLS FALSE |
| 360 | #endif | ||
| 361 | |||
| 362 | /** | ||
| 363 | * @brief Objects FIFOs APIs. | ||
| 364 | * @details If enabled then the objects FIFOs APIs are included | ||
| 365 | * in the kernel. | ||
| 366 | * | ||
| 367 | * @note The default is @p TRUE. | ||
| 368 | */ | ||
| 369 | #if !defined(CH_CFG_USE_OBJ_FIFOS) | ||
| 370 | #define CH_CFG_USE_OBJ_FIFOS FALSE | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief Pipes APIs. | ||
| 375 | * @details If enabled then the pipes APIs are included | ||
| 376 | * in the kernel. | ||
| 377 | * | ||
| 378 | * @note The default is @p TRUE. | ||
| 379 | */ | ||
| 380 | #if !defined(CH_CFG_USE_PIPES) | ||
| 381 | #define CH_CFG_USE_PIPES FALSE | ||
| 382 | #endif | ||
| 296 | 383 | ||
| 297 | /** | 384 | /** |
| 298 | * @brief Dynamic Threads APIs. | 385 | * @brief Dynamic Threads APIs. |
| @@ -303,7 +390,80 @@ | |||
| 303 | * @note Requires @p CH_CFG_USE_WAITEXIT. | 390 | * @note Requires @p CH_CFG_USE_WAITEXIT. |
| 304 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | 391 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. |
| 305 | */ | 392 | */ |
| 393 | #if !defined(CH_CFG_USE_DYNAMIC) | ||
| 306 | #define CH_CFG_USE_DYNAMIC FALSE | 394 | #define CH_CFG_USE_DYNAMIC FALSE |
| 395 | #endif | ||
| 396 | |||
| 397 | /** @} */ | ||
| 398 | |||
| 399 | /*===========================================================================*/ | ||
| 400 | /** | ||
| 401 | * @name Objects factory options | ||
| 402 | * @{ | ||
| 403 | */ | ||
| 404 | /*===========================================================================*/ | ||
| 405 | |||
| 406 | /** | ||
| 407 | * @brief Objects Factory APIs. | ||
| 408 | * @details If enabled then the objects factory APIs are included in the | ||
| 409 | * kernel. | ||
| 410 | * | ||
| 411 | * @note The default is @p FALSE. | ||
| 412 | */ | ||
| 413 | #if !defined(CH_CFG_USE_FACTORY) | ||
| 414 | #define CH_CFG_USE_FACTORY FALSE | ||
| 415 | #endif | ||
| 416 | |||
| 417 | /** | ||
| 418 | * @brief Maximum length for object names. | ||
| 419 | * @details If the specified length is zero then the name is stored by | ||
| 420 | * pointer but this could have unintended side effects. | ||
| 421 | */ | ||
| 422 | #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | ||
| 423 | #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Enables the registry of generic objects. | ||
| 428 | */ | ||
| 429 | #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | ||
| 430 | #define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE | ||
| 431 | #endif | ||
| 432 | |||
| 433 | /** | ||
| 434 | * @brief Enables factory for generic buffers. | ||
| 435 | */ | ||
| 436 | #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | ||
| 437 | #define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE | ||
| 438 | #endif | ||
| 439 | |||
| 440 | /** | ||
| 441 | * @brief Enables factory for semaphores. | ||
| 442 | */ | ||
| 443 | #if !defined(CH_CFG_FACTORY_SEMAPHORES) | ||
| 444 | #define CH_CFG_FACTORY_SEMAPHORES FALSE | ||
| 445 | #endif | ||
| 446 | |||
| 447 | /** | ||
| 448 | * @brief Enables factory for mailboxes. | ||
| 449 | */ | ||
| 450 | #if !defined(CH_CFG_FACTORY_MAILBOXES) | ||
| 451 | #define CH_CFG_FACTORY_MAILBOXES FALSE | ||
| 452 | #endif | ||
| 453 | |||
| 454 | /** | ||
| 455 | * @brief Enables factory for objects FIFOs. | ||
| 456 | */ | ||
| 457 | #if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | ||
| 458 | #define CH_CFG_FACTORY_OBJ_FIFOS FALSE | ||
| 459 | #endif | ||
| 460 | |||
| 461 | /** | ||
| 462 | * @brief Enables factory for Pipes. | ||
| 463 | */ | ||
| 464 | #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) | ||
| 465 | #define CH_CFG_FACTORY_PIPES FALSE | ||
| 466 | #endif | ||
| 307 | 467 | ||
| 308 | /** @} */ | 468 | /** @} */ |
| 309 | 469 | ||
| @@ -319,7 +479,9 @@ | |||
| 319 | * | 479 | * |
| 320 | * @note The default is @p FALSE. | 480 | * @note The default is @p FALSE. |
| 321 | */ | 481 | */ |
| 482 | #if !defined(CH_DBG_STATISTICS) | ||
| 322 | #define CH_DBG_STATISTICS FALSE | 483 | #define CH_DBG_STATISTICS FALSE |
| 484 | #endif | ||
| 323 | 485 | ||
| 324 | /** | 486 | /** |
| 325 | * @brief Debug option, system state check. | 487 | * @brief Debug option, system state check. |
| @@ -328,7 +490,9 @@ | |||
| 328 | * | 490 | * |
| 329 | * @note The default is @p FALSE. | 491 | * @note The default is @p FALSE. |
| 330 | */ | 492 | */ |
| 493 | #if !defined(CH_DBG_SYSTEM_STATE_CHECK) | ||
| 331 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | 494 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE |
| 495 | #endif | ||
| 332 | 496 | ||
| 333 | /** | 497 | /** |
| 334 | * @brief Debug option, parameters checks. | 498 | * @brief Debug option, parameters checks. |
| @@ -337,7 +501,9 @@ | |||
| 337 | * | 501 | * |
| 338 | * @note The default is @p FALSE. | 502 | * @note The default is @p FALSE. |
| 339 | */ | 503 | */ |
| 504 | #if !defined(CH_DBG_ENABLE_CHECKS) | ||
| 340 | #define CH_DBG_ENABLE_CHECKS FALSE | 505 | #define CH_DBG_ENABLE_CHECKS FALSE |
| 506 | #endif | ||
| 341 | 507 | ||
| 342 | /** | 508 | /** |
| 343 | * @brief Debug option, consistency checks. | 509 | * @brief Debug option, consistency checks. |
| @@ -347,7 +513,9 @@ | |||
| 347 | * | 513 | * |
| 348 | * @note The default is @p FALSE. | 514 | * @note The default is @p FALSE. |
| 349 | */ | 515 | */ |
| 516 | #if !defined(CH_DBG_ENABLE_ASSERTS) | ||
| 350 | #define CH_DBG_ENABLE_ASSERTS FALSE | 517 | #define CH_DBG_ENABLE_ASSERTS FALSE |
| 518 | #endif | ||
| 351 | 519 | ||
| 352 | /** | 520 | /** |
| 353 | * @brief Debug option, trace buffer. | 521 | * @brief Debug option, trace buffer. |
| @@ -355,14 +523,18 @@ | |||
| 355 | * | 523 | * |
| 356 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | 524 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. |
| 357 | */ | 525 | */ |
| 526 | #if !defined(CH_DBG_TRACE_MASK) | ||
| 358 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | 527 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
| 528 | #endif | ||
| 359 | 529 | ||
| 360 | /** | 530 | /** |
| 361 | * @brief Trace buffer entries. | 531 | * @brief Trace buffer entries. |
| 362 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | 532 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is |
| 363 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | 533 | * different from @p CH_DBG_TRACE_MASK_DISABLED. |
| 364 | */ | 534 | */ |
| 535 | #if !defined(CH_DBG_TRACE_BUFFER_SIZE) | ||
| 365 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | 536 | #define CH_DBG_TRACE_BUFFER_SIZE 128 |
| 537 | #endif | ||
| 366 | 538 | ||
| 367 | /** | 539 | /** |
| 368 | * @brief Debug option, stack checks. | 540 | * @brief Debug option, stack checks. |
| @@ -374,7 +546,9 @@ | |||
| 374 | * @note The default failure mode is to halt the system with the global | 546 | * @note The default failure mode is to halt the system with the global |
| 375 | * @p panic_msg variable set to @p NULL. | 547 | * @p panic_msg variable set to @p NULL. |
| 376 | */ | 548 | */ |
| 549 | #if !defined(CH_DBG_ENABLE_STACK_CHECK) | ||
| 377 | #define CH_DBG_ENABLE_STACK_CHECK FALSE | 550 | #define CH_DBG_ENABLE_STACK_CHECK FALSE |
| 551 | #endif | ||
| 378 | 552 | ||
| 379 | /** | 553 | /** |
| 380 | * @brief Debug option, stacks initialization. | 554 | * @brief Debug option, stacks initialization. |
| @@ -384,7 +558,9 @@ | |||
| 384 | * | 558 | * |
| 385 | * @note The default is @p FALSE. | 559 | * @note The default is @p FALSE. |
| 386 | */ | 560 | */ |
| 561 | #if !defined(CH_DBG_FILL_THREADS) | ||
| 387 | #define CH_DBG_FILL_THREADS FALSE | 562 | #define CH_DBG_FILL_THREADS FALSE |
| 563 | #endif | ||
| 388 | 564 | ||
| 389 | /** | 565 | /** |
| 390 | * @brief Debug option, threads profiling. | 566 | * @brief Debug option, threads profiling. |
| @@ -395,7 +571,9 @@ | |||
| 395 | * @note This debug option is not currently compatible with the | 571 | * @note This debug option is not currently compatible with the |
| 396 | * tickless mode. | 572 | * tickless mode. |
| 397 | */ | 573 | */ |
| 574 | #if !defined(CH_DBG_THREADS_PROFILING) | ||
| 398 | #define CH_DBG_THREADS_PROFILING FALSE | 575 | #define CH_DBG_THREADS_PROFILING FALSE |
| 576 | #endif | ||
| 399 | 577 | ||
| 400 | /** @} */ | 578 | /** @} */ |
| 401 | 579 | ||
| @@ -407,6 +585,22 @@ | |||
| 407 | /*===========================================================================*/ | 585 | /*===========================================================================*/ |
| 408 | 586 | ||
| 409 | /** | 587 | /** |
| 588 | * @brief System structure extension. | ||
| 589 | * @details User fields added to the end of the @p ch_system_t structure. | ||
| 590 | */ | ||
| 591 | #define CH_CFG_SYSTEM_EXTRA_FIELDS \ | ||
| 592 | /* Add threads custom fields here.*/ | ||
| 593 | |||
| 594 | /** | ||
| 595 | * @brief System initialization hook. | ||
| 596 | * @details User initialization code added to the @p chSysInit() function | ||
| 597 | * just before interrupts are enabled globally. | ||
| 598 | */ | ||
| 599 | #define CH_CFG_SYSTEM_INIT_HOOK() { \ | ||
| 600 | /* Add threads initialization code here.*/ \ | ||
| 601 | } | ||
| 602 | |||
| 603 | /** | ||
| 410 | * @brief Threads descriptor structure extension. | 604 | * @brief Threads descriptor structure extension. |
| 411 | * @details User fields added to the end of the @p thread_t structure. | 605 | * @details User fields added to the end of the @p thread_t structure. |
| 412 | */ | 606 | */ |
| @@ -415,9 +609,9 @@ | |||
| 415 | 609 | ||
| 416 | /** | 610 | /** |
| 417 | * @brief Threads initialization hook. | 611 | * @brief Threads initialization hook. |
| 418 | * @details User initialization code added to the @p chThdInit() API. | 612 | * @details User initialization code added to the @p _thread_init() function. |
| 419 | * | 613 | * |
| 420 | * @note It is invoked from within @p chThdInit() and implicitly from all | 614 | * @note It is invoked from within @p _thread_init() and implicitly from all |
| 421 | * the threads creation APIs. | 615 | * the threads creation APIs. |
| 422 | */ | 616 | */ |
| 423 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | 617 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ |
diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h index 9a9ab838e..7347a4253 100644 --- a/keyboards/cannonkeys/satisfaction75/halconf.h +++ b/keyboards/cannonkeys/satisfaction75/halconf.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio |
| 3 | 3 | ||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. | 5 | you may not use this file except in compliance with the License. |
| @@ -25,8 +25,11 @@ | |||
| 25 | * @{ | 25 | * @{ |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | #ifndef _HALCONF_H_ | 28 | #ifndef HALCONF_H |
| 29 | #define _HALCONF_H_ | 29 | #define HALCONF_H |
| 30 | |||
| 31 | #define _CHIBIOS_HAL_CONF_ | ||
| 32 | #define _CHIBIOS_HAL_CONF_VER_7_0_ | ||
| 30 | 33 | ||
| 31 | #include "mcuconf.h" | 34 | #include "mcuconf.h" |
| 32 | 35 | ||
| @@ -34,140 +37,181 @@ | |||
| 34 | * @brief Enables the PAL subsystem. | 37 | * @brief Enables the PAL subsystem. |
| 35 | */ | 38 | */ |
| 36 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | 39 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) |
| 37 | #define HAL_USE_PAL TRUE | 40 | #define HAL_USE_PAL TRUE |
| 38 | #endif | 41 | #endif |
| 39 | 42 | ||
| 40 | /** | 43 | /** |
| 41 | * @brief Enables the ADC subsystem. | 44 | * @brief Enables the ADC subsystem. |
| 42 | */ | 45 | */ |
| 43 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | 46 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) |
| 44 | #define HAL_USE_ADC FALSE | 47 | #define HAL_USE_ADC FALSE |
| 45 | #endif | 48 | #endif |
| 46 | 49 | ||
| 47 | /** | 50 | /** |
| 48 | * @brief Enables the CAN subsystem. | 51 | * @brief Enables the CAN subsystem. |
| 49 | */ | 52 | */ |
| 50 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | 53 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) |
| 51 | #define HAL_USE_CAN FALSE | 54 | #define HAL_USE_CAN FALSE |
| 52 | #endif | 55 | #endif |
| 53 | 56 | ||
| 54 | /** | 57 | /** |
| 55 | * @brief Enables the DAC subsystem. | 58 | * @brief Enables the cryptographic subsystem. |
| 56 | */ | 59 | */ |
| 57 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | 60 | #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) |
| 58 | #define HAL_USE_DAC FALSE | 61 | #define HAL_USE_CRY FALSE |
| 59 | #endif | 62 | #endif |
| 60 | 63 | ||
| 61 | /** | 64 | /** |
| 62 | * @brief Enables the EXT subsystem. | 65 | * @brief Enables the DAC subsystem. |
| 63 | */ | 66 | */ |
| 64 | #if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) | 67 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) |
| 65 | #define HAL_USE_EXT FALSE | 68 | #define HAL_USE_DAC FALSE |
| 66 | #endif | 69 | #endif |
| 67 | 70 | ||
| 68 | /** | 71 | /** |
| 69 | * @brief Enables the GPT subsystem. | 72 | * @brief Enables the GPT subsystem. |
| 70 | */ | 73 | */ |
| 71 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | 74 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) |
| 72 | #define HAL_USE_GPT FALSE | 75 | #define HAL_USE_GPT FALSE |
| 73 | #endif | 76 | #endif |
| 74 | 77 | ||
| 75 | /** | 78 | /** |
| 76 | * @brief Enables the I2C subsystem. | 79 | * @brief Enables the I2C subsystem. |
| 77 | */ | 80 | */ |
| 78 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | 81 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) |
| 79 | #define HAL_USE_I2C TRUE | 82 | #define HAL_USE_I2C TRUE |
| 80 | #endif | 83 | #endif |
| 81 | 84 | ||
| 82 | /** | 85 | /** |
| 83 | * @brief Enables the I2S subsystem. | 86 | * @brief Enables the I2S subsystem. |
| 84 | */ | 87 | */ |
| 85 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | 88 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) |
| 86 | #define HAL_USE_I2S FALSE | 89 | #define HAL_USE_I2S FALSE |
| 87 | #endif | 90 | #endif |
| 88 | 91 | ||
| 89 | /** | 92 | /** |
| 90 | * @brief Enables the ICU subsystem. | 93 | * @brief Enables the ICU subsystem. |
| 91 | */ | 94 | */ |
| 92 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | 95 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) |
| 93 | #define HAL_USE_ICU FALSE | 96 | #define HAL_USE_ICU FALSE |
| 94 | #endif | 97 | #endif |
| 95 | 98 | ||
| 96 | /** | 99 | /** |
| 97 | * @brief Enables the MAC subsystem. | 100 | * @brief Enables the MAC subsystem. |
| 98 | */ | 101 | */ |
| 99 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | 102 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) |
| 100 | #define HAL_USE_MAC FALSE | 103 | #define HAL_USE_MAC FALSE |
| 101 | #endif | 104 | #endif |
| 102 | 105 | ||
| 103 | /** | 106 | /** |
| 104 | * @brief Enables the MMC_SPI subsystem. | 107 | * @brief Enables the MMC_SPI subsystem. |
| 105 | */ | 108 | */ |
| 106 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | 109 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) |
| 107 | #define HAL_USE_MMC_SPI FALSE | 110 | #define HAL_USE_MMC_SPI FALSE |
| 108 | #endif | 111 | #endif |
| 109 | 112 | ||
| 110 | /** | 113 | /** |
| 111 | * @brief Enables the PWM subsystem. | 114 | * @brief Enables the PWM subsystem. |
| 112 | */ | 115 | */ |
| 113 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | 116 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) |
| 114 | #define HAL_USE_PWM TRUE | 117 | #define HAL_USE_PWM TRUE |
| 115 | #endif | 118 | #endif |
| 116 | 119 | ||
| 117 | /** | 120 | /** |
| 118 | * @brief Enables the RTC subsystem. | 121 | * @brief Enables the RTC subsystem. |
| 119 | */ | 122 | */ |
| 120 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | 123 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) |
| 121 | #define HAL_USE_RTC TRUE | 124 | #define HAL_USE_RTC TRUE |
| 122 | #endif | 125 | #endif |
| 123 | 126 | ||
| 124 | /** | 127 | /** |
| 125 | * @brief Enables the SDC subsystem. | 128 | * @brief Enables the SDC subsystem. |
| 126 | */ | 129 | */ |
| 127 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | 130 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) |
| 128 | #define HAL_USE_SDC FALSE | 131 | #define HAL_USE_SDC FALSE |
| 129 | #endif | 132 | #endif |
| 130 | 133 | ||
| 131 | /** | 134 | /** |
| 132 | * @brief Enables the SERIAL subsystem. | 135 | * @brief Enables the SERIAL subsystem. |
| 133 | */ | 136 | */ |
| 134 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | 137 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) |
| 135 | #define HAL_USE_SERIAL FALSE | 138 | #define HAL_USE_SERIAL FALSE |
| 136 | #endif | 139 | #endif |
| 137 | 140 | ||
| 138 | /** | 141 | /** |
| 139 | * @brief Enables the SERIAL over USB subsystem. | 142 | * @brief Enables the SERIAL over USB subsystem. |
| 140 | */ | 143 | */ |
| 141 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | 144 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) |
| 142 | #define HAL_USE_SERIAL_USB FALSE | 145 | #define HAL_USE_SERIAL_USB FALSE |
| 146 | #endif | ||
| 147 | |||
| 148 | /** | ||
| 149 | * @brief Enables the SIO subsystem. | ||
| 150 | */ | ||
| 151 | #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | ||
| 152 | #define HAL_USE_SIO FALSE | ||
| 143 | #endif | 153 | #endif |
| 144 | 154 | ||
| 145 | /** | 155 | /** |
| 146 | * @brief Enables the SPI subsystem. | 156 | * @brief Enables the SPI subsystem. |
| 147 | */ | 157 | */ |
| 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | 158 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) |
| 149 | #define HAL_USE_SPI TRUE | 159 | #define HAL_USE_SPI TRUE |
| 160 | #endif | ||
| 161 | |||
| 162 | /** | ||
| 163 | * @brief Enables the TRNG subsystem. | ||
| 164 | */ | ||
| 165 | #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | ||
| 166 | #define HAL_USE_TRNG FALSE | ||
| 150 | #endif | 167 | #endif |
| 151 | 168 | ||
| 152 | /** | 169 | /** |
| 153 | * @brief Enables the UART subsystem. | 170 | * @brief Enables the UART subsystem. |
| 154 | */ | 171 | */ |
| 155 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | 172 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) |
| 156 | #define HAL_USE_UART FALSE | 173 | #define HAL_USE_UART FALSE |
| 157 | #endif | 174 | #endif |
| 158 | 175 | ||
| 159 | /** | 176 | /** |
| 160 | * @brief Enables the USB subsystem. | 177 | * @brief Enables the USB subsystem. |
| 161 | */ | 178 | */ |
| 162 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | 179 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) |
| 163 | #define HAL_USE_USB TRUE | 180 | #define HAL_USE_USB TRUE |
| 164 | #endif | 181 | #endif |
| 165 | 182 | ||
| 166 | /** | 183 | /** |
| 167 | * @brief Enables the WDG subsystem. | 184 | * @brief Enables the WDG subsystem. |
| 168 | */ | 185 | */ |
| 169 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | 186 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) |
| 170 | #define HAL_USE_WDG FALSE | 187 | #define HAL_USE_WDG FALSE |
| 188 | #endif | ||
| 189 | |||
| 190 | /** | ||
| 191 | * @brief Enables the WSPI subsystem. | ||
| 192 | */ | ||
| 193 | #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | ||
| 194 | #define HAL_USE_WSPI FALSE | ||
| 195 | #endif | ||
| 196 | |||
| 197 | /*===========================================================================*/ | ||
| 198 | /* PAL driver related settings. */ | ||
| 199 | /*===========================================================================*/ | ||
| 200 | |||
| 201 | /** | ||
| 202 | * @brief Enables synchronous APIs. | ||
| 203 | * @note Disabling this option saves both code and data space. | ||
| 204 | */ | ||
| 205 | #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 206 | #define PAL_USE_CALLBACKS FALSE | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /** | ||
| 210 | * @brief Enables synchronous APIs. | ||
| 211 | * @note Disabling this option saves both code and data space. | ||
| 212 | */ | ||
| 213 | #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | ||
| 214 | #define PAL_USE_WAIT FALSE | ||
| 171 | #endif | 215 | #endif |
| 172 | 216 | ||
| 173 | /*===========================================================================*/ | 217 | /*===========================================================================*/ |
| @@ -179,7 +223,7 @@ | |||
| 179 | * @note Disabling this option saves both code and data space. | 223 | * @note Disabling this option saves both code and data space. |
| 180 | */ | 224 | */ |
| 181 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | 225 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) |
| 182 | #define ADC_USE_WAIT TRUE | 226 | #define ADC_USE_WAIT TRUE |
| 183 | #endif | 227 | #endif |
| 184 | 228 | ||
| 185 | /** | 229 | /** |
| @@ -187,7 +231,7 @@ | |||
| 187 | * @note Disabling this option saves both code and data space. | 231 | * @note Disabling this option saves both code and data space. |
| 188 | */ | 232 | */ |
| 189 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 233 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
| 190 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | 234 | #define ADC_USE_MUTUAL_EXCLUSION TRUE |
| 191 | #endif | 235 | #endif |
| 192 | 236 | ||
| 193 | /*===========================================================================*/ | 237 | /*===========================================================================*/ |
| @@ -198,7 +242,56 @@ | |||
| 198 | * @brief Sleep mode related APIs inclusion switch. | 242 | * @brief Sleep mode related APIs inclusion switch. |
| 199 | */ | 243 | */ |
| 200 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | 244 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) |
| 201 | #define CAN_USE_SLEEP_MODE TRUE | 245 | #define CAN_USE_SLEEP_MODE TRUE |
| 246 | #endif | ||
| 247 | |||
| 248 | /** | ||
| 249 | * @brief Enforces the driver to use direct callbacks rather than OSAL events. | ||
| 250 | */ | ||
| 251 | #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 252 | #define CAN_ENFORCE_USE_CALLBACKS FALSE | ||
| 253 | #endif | ||
| 254 | |||
| 255 | /*===========================================================================*/ | ||
| 256 | /* CRY driver related settings. */ | ||
| 257 | /*===========================================================================*/ | ||
| 258 | |||
| 259 | /** | ||
| 260 | * @brief Enables the SW fall-back of the cryptographic driver. | ||
| 261 | * @details When enabled, this option, activates a fall-back software | ||
| 262 | * implementation for algorithms not supported by the underlying | ||
| 263 | * hardware. | ||
| 264 | * @note Fall-back implementations may not be present for all algorithms. | ||
| 265 | */ | ||
| 266 | #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | ||
| 267 | #define HAL_CRY_USE_FALLBACK FALSE | ||
| 268 | #endif | ||
| 269 | |||
| 270 | /** | ||
| 271 | * @brief Makes the driver forcibly use the fall-back implementations. | ||
| 272 | */ | ||
| 273 | #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | ||
| 274 | #define HAL_CRY_ENFORCE_FALLBACK FALSE | ||
| 275 | #endif | ||
| 276 | |||
| 277 | /*===========================================================================*/ | ||
| 278 | /* DAC driver related settings. */ | ||
| 279 | /*===========================================================================*/ | ||
| 280 | |||
| 281 | /** | ||
| 282 | * @brief Enables synchronous APIs. | ||
| 283 | * @note Disabling this option saves both code and data space. | ||
| 284 | */ | ||
| 285 | #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | ||
| 286 | #define DAC_USE_WAIT TRUE | ||
| 287 | #endif | ||
| 288 | |||
| 289 | /** | ||
| 290 | * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | ||
| 291 | * @note Disabling this option saves both code and data space. | ||
| 292 | */ | ||
| 293 | #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 294 | #define DAC_USE_MUTUAL_EXCLUSION TRUE | ||
| 202 | #endif | 295 | #endif |
| 203 | 296 | ||
| 204 | /*===========================================================================*/ | 297 | /*===========================================================================*/ |
| @@ -209,7 +302,7 @@ | |||
| 209 | * @brief Enables the mutual exclusion APIs on the I2C bus. | 302 | * @brief Enables the mutual exclusion APIs on the I2C bus. |
| 210 | */ | 303 | */ |
| 211 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 304 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
| 212 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | 305 | #define I2C_USE_MUTUAL_EXCLUSION TRUE |
| 213 | #endif | 306 | #endif |
| 214 | 307 | ||
| 215 | /*===========================================================================*/ | 308 | /*===========================================================================*/ |
| @@ -217,17 +310,17 @@ | |||
| 217 | /*===========================================================================*/ | 310 | /*===========================================================================*/ |
| 218 | 311 | ||
| 219 | /** | 312 | /** |
| 220 | * @brief Enables an event sources for incoming packets. | 313 | * @brief Enables the zero-copy API. |
| 221 | */ | 314 | */ |
| 222 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | 315 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) |
| 223 | #define MAC_USE_ZERO_COPY FALSE | 316 | #define MAC_USE_ZERO_COPY FALSE |
| 224 | #endif | 317 | #endif |
| 225 | 318 | ||
| 226 | /** | 319 | /** |
| 227 | * @brief Enables an event sources for incoming packets. | 320 | * @brief Enables an event sources for incoming packets. |
| 228 | */ | 321 | */ |
| 229 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | 322 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) |
| 230 | #define MAC_USE_EVENTS TRUE | 323 | #define MAC_USE_EVENTS TRUE |
| 231 | #endif | 324 | #endif |
| 232 | 325 | ||
| 233 | /*===========================================================================*/ | 326 | /*===========================================================================*/ |
| @@ -243,7 +336,7 @@ | |||
| 243 | * use a DMA channel and heavily loads the CPU. | 336 | * use a DMA channel and heavily loads the CPU. |
| 244 | */ | 337 | */ |
| 245 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | 338 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) |
| 246 | #define MMC_NICE_WAITING TRUE | 339 | #define MMC_NICE_WAITING TRUE |
| 247 | #endif | 340 | #endif |
| 248 | 341 | ||
| 249 | /*===========================================================================*/ | 342 | /*===========================================================================*/ |
| @@ -255,7 +348,7 @@ | |||
| 255 | * @note Attempts are performed at 10mS intervals. | 348 | * @note Attempts are performed at 10mS intervals. |
| 256 | */ | 349 | */ |
| 257 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | 350 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) |
| 258 | #define SDC_INIT_RETRY 100 | 351 | #define SDC_INIT_RETRY 100 |
| 259 | #endif | 352 | #endif |
| 260 | 353 | ||
| 261 | /** | 354 | /** |
| @@ -264,7 +357,7 @@ | |||
| 264 | * at @p FALSE. | 357 | * at @p FALSE. |
| 265 | */ | 358 | */ |
| 266 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | 359 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) |
| 267 | #define SDC_MMC_SUPPORT FALSE | 360 | #define SDC_MMC_SUPPORT FALSE |
| 268 | #endif | 361 | #endif |
| 269 | 362 | ||
| 270 | /** | 363 | /** |
| @@ -274,7 +367,21 @@ | |||
| 274 | * lower priority, this may slow down the driver a bit however. | 367 | * lower priority, this may slow down the driver a bit however. |
| 275 | */ | 368 | */ |
| 276 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | 369 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) |
| 277 | #define SDC_NICE_WAITING TRUE | 370 | #define SDC_NICE_WAITING TRUE |
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief OCR initialization constant for V20 cards. | ||
| 375 | */ | ||
| 376 | #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | ||
| 377 | #define SDC_INIT_OCR_V20 0x50FF8000U | ||
| 378 | #endif | ||
| 379 | |||
| 380 | /** | ||
| 381 | * @brief OCR initialization constant for non-V20 cards. | ||
| 382 | */ | ||
| 383 | #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | ||
| 384 | #define SDC_INIT_OCR 0x80100000U | ||
| 278 | #endif | 385 | #endif |
| 279 | 386 | ||
| 280 | /*===========================================================================*/ | 387 | /*===========================================================================*/ |
| @@ -287,18 +394,18 @@ | |||
| 287 | * default configuration. | 394 | * default configuration. |
| 288 | */ | 395 | */ |
| 289 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | 396 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) |
| 290 | #define SERIAL_DEFAULT_BITRATE 38400 | 397 | #define SERIAL_DEFAULT_BITRATE 38400 |
| 291 | #endif | 398 | #endif |
| 292 | 399 | ||
| 293 | /** | 400 | /** |
| 294 | * @brief Serial buffers size. | 401 | * @brief Serial buffers size. |
| 295 | * @details Configuration parameter, you can change the depth of the queue | 402 | * @details Configuration parameter, you can change the depth of the queue |
| 296 | * buffers depending on the requirements of your application. | 403 | * buffers depending on the requirements of your application. |
| 297 | * @note The default is 64 bytes for both the transmission and receive | 404 | * @note The default is 16 bytes for both the transmission and receive |
| 298 | * buffers. | 405 | * buffers. |
| 299 | */ | 406 | */ |
| 300 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | 407 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) |
| 301 | #define SERIAL_BUFFERS_SIZE 16 | 408 | #define SERIAL_BUFFERS_SIZE 16 |
| 302 | #endif | 409 | #endif |
| 303 | 410 | ||
| 304 | /*===========================================================================*/ | 411 | /*===========================================================================*/ |
| @@ -309,11 +416,19 @@ | |||
| 309 | * @brief Serial over USB buffers size. | 416 | * @brief Serial over USB buffers size. |
| 310 | * @details Configuration parameter, the buffer size must be a multiple of | 417 | * @details Configuration parameter, the buffer size must be a multiple of |
| 311 | * the USB data endpoint maximum packet size. | 418 | * the USB data endpoint maximum packet size. |
| 312 | * @note The default is 64 bytes for both the transmission and receive | 419 | * @note The default is 256 bytes for both the transmission and receive |
| 313 | * buffers. | 420 | * buffers. |
| 314 | */ | 421 | */ |
| 315 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | 422 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) |
| 316 | #define SERIAL_USB_BUFFERS_SIZE 1 | 423 | #define SERIAL_USB_BUFFERS_SIZE 1 |
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Serial over USB number of buffers. | ||
| 428 | * @note The default is 2 buffers. | ||
| 429 | */ | ||
| 430 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
| 431 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
| 317 | #endif | 432 | #endif |
| 318 | 433 | ||
| 319 | /*===========================================================================*/ | 434 | /*===========================================================================*/ |
| @@ -325,17 +440,53 @@ | |||
| 325 | * @note Disabling this option saves both code and data space. | 440 | * @note Disabling this option saves both code and data space. |
| 326 | */ | 441 | */ |
| 327 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | 442 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) |
| 328 | #define SPI_USE_WAIT TRUE | 443 | #define SPI_USE_WAIT TRUE |
| 444 | #endif | ||
| 445 | |||
| 446 | /** | ||
| 447 | * @brief Enables circular transfers APIs. | ||
| 448 | * @note Disabling this option saves both code and data space. | ||
| 449 | */ | ||
| 450 | #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | ||
| 451 | #define SPI_USE_CIRCULAR FALSE | ||
| 329 | #endif | 452 | #endif |
| 330 | 453 | ||
| 454 | |||
| 331 | /** | 455 | /** |
| 332 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | 456 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. |
| 333 | * @note Disabling this option saves both code and data space. | 457 | * @note Disabling this option saves both code and data space. |
| 334 | */ | 458 | */ |
| 335 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | 459 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) |
| 336 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | 460 | #define SPI_USE_MUTUAL_EXCLUSION TRUE |
| 461 | #endif | ||
| 462 | |||
| 463 | /** | ||
| 464 | * @brief Handling method for SPI CS line. | ||
| 465 | * @note Disabling this option saves both code and data space. | ||
| 466 | */ | ||
| 467 | #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | ||
| 468 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
| 469 | #endif | ||
| 470 | |||
| 471 | /*===========================================================================*/ | ||
| 472 | /* UART driver related settings. */ | ||
| 473 | /*===========================================================================*/ | ||
| 474 | |||
| 475 | /** | ||
| 476 | * @brief Enables synchronous APIs. | ||
| 477 | * @note Disabling this option saves both code and data space. | ||
| 478 | */ | ||
| 479 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
| 480 | #define UART_USE_WAIT FALSE | ||
| 337 | #endif | 481 | #endif |
| 338 | 482 | ||
| 483 | /** | ||
| 484 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
| 485 | * @note Disabling this option saves both code and data space. | ||
| 486 | */ | ||
| 487 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 488 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
| 489 | #endif | ||
| 339 | 490 | ||
| 340 | /*===========================================================================*/ | 491 | /*===========================================================================*/ |
| 341 | /* USB driver related settings. */ | 492 | /* USB driver related settings. */ |
| @@ -346,9 +497,29 @@ | |||
| 346 | * @note Disabling this option saves both code and data space. | 497 | * @note Disabling this option saves both code and data space. |
| 347 | */ | 498 | */ |
| 348 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | 499 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) |
| 349 | #define USB_USE_WAIT TRUE | 500 | #define USB_USE_WAIT TRUE |
| 501 | #endif | ||
| 502 | |||
| 503 | /*===========================================================================*/ | ||
| 504 | /* WSPI driver related settings. */ | ||
| 505 | /*===========================================================================*/ | ||
| 506 | |||
| 507 | /** | ||
| 508 | * @brief Enables synchronous APIs. | ||
| 509 | * @note Disabling this option saves both code and data space. | ||
| 510 | */ | ||
| 511 | #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | ||
| 512 | #define WSPI_USE_WAIT TRUE | ||
| 513 | #endif | ||
| 514 | |||
| 515 | /** | ||
| 516 | * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | ||
| 517 | * @note Disabling this option saves both code and data space. | ||
| 518 | */ | ||
| 519 | #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 520 | #define WSPI_USE_MUTUAL_EXCLUSION TRUE | ||
| 350 | #endif | 521 | #endif |
| 351 | 522 | ||
| 352 | #endif /* _HALCONF_H_ */ | 523 | #endif /* HALCONF_H */ |
| 353 | 524 | ||
| 354 | /** @} */ | 525 | /** @} */ |
diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c index 0e3adbbf1..d87f7668d 100644 --- a/keyboards/cannonkeys/satisfaction75/i2c_master.c +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c | |||
| @@ -81,7 +81,7 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, | |||
| 81 | i2c_address = address; | 81 | i2c_address = address; |
| 82 | i2cStart(&I2C_DRIVER, &i2cconfig); | 82 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 83 | i2cAcquireBus(&I2C_DRIVER); | 83 | i2cAcquireBus(&I2C_DRIVER); |
| 84 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); | 84 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout)); |
| 85 | i2cReleaseBus(&I2C_DRIVER); | 85 | i2cReleaseBus(&I2C_DRIVER); |
| 86 | return chibios_to_qmk(status); | 86 | return chibios_to_qmk(status); |
| 87 | } | 87 | } |
| @@ -90,7 +90,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 | |||
| 90 | { | 90 | { |
| 91 | i2c_address = address; | 91 | i2c_address = address; |
| 92 | i2cStart(&I2C_DRIVER, &i2cconfig); | 92 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 93 | msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); | 93 | msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, TIME_MS2I(timeout)); |
| 94 | return chibios_to_qmk(status); | 94 | return chibios_to_qmk(status); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| @@ -106,7 +106,7 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, | |||
| 106 | } | 106 | } |
| 107 | complete_packet[0] = regaddr; | 107 | complete_packet[0] = regaddr; |
| 108 | 108 | ||
| 109 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); | 109 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout)); |
| 110 | return chibios_to_qmk(status); | 110 | return chibios_to_qmk(status); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| @@ -114,7 +114,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 | |||
| 114 | { | 114 | { |
| 115 | i2c_address = devaddr; | 115 | i2c_address = devaddr; |
| 116 | i2cStart(&I2C_DRIVER, &i2cconfig); | 116 | i2cStart(&I2C_DRIVER, &i2cconfig); |
| 117 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, MS2ST(timeout)); | 117 | msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®addr, 1, data, length, TIME_MS2I(timeout)); |
| 118 | return chibios_to_qmk(status); | 118 | return chibios_to_qmk(status); |
| 119 | } | 119 | } |
| 120 | 120 | ||
diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h index 6d8985796..b39e33513 100644 --- a/keyboards/cannonkeys/satisfaction75/mcuconf.h +++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h | |||
| @@ -37,140 +37,141 @@ | |||
| 37 | /* | 37 | /* |
| 38 | * HAL driver system settings. | 38 | * HAL driver system settings. |
| 39 | */ | 39 | */ |
| 40 | #define STM32_NO_INIT FALSE | 40 | #define STM32_NO_INIT FALSE |
| 41 | #define STM32_PVD_ENABLE FALSE | 41 | #define STM32_PVD_ENABLE FALSE |
| 42 | #define STM32_PLS STM32_PLS_LEV0 | 42 | #define STM32_PLS STM32_PLS_LEV0 |
| 43 | #define STM32_HSI_ENABLED TRUE | 43 | #define STM32_HSI_ENABLED TRUE |
| 44 | #define STM32_HSI14_ENABLED TRUE | 44 | #define STM32_HSI14_ENABLED TRUE |
| 45 | #define STM32_HSI48_ENABLED FALSE | 45 | #define STM32_HSI48_ENABLED FALSE |
| 46 | #define STM32_LSI_ENABLED TRUE | 46 | #define STM32_LSI_ENABLED TRUE |
| 47 | #define STM32_HSE_ENABLED FALSE | 47 | #define STM32_HSE_ENABLED FALSE |
| 48 | #define STM32_LSE_ENABLED TRUE | 48 | #define STM32_LSE_ENABLED TRUE |
| 49 | #define STM32_SW STM32_SW_PLL | 49 | #define STM32_SW STM32_SW_PLL |
| 50 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 | 50 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 |
| 51 | #define STM32_PREDIV_VALUE 1 | 51 | #define STM32_PREDIV_VALUE 1 |
| 52 | #define STM32_PLLMUL_VALUE 12 | 52 | #define STM32_PLLMUL_VALUE 12 |
| 53 | #define STM32_HPRE STM32_HPRE_DIV1 | 53 | #define STM32_HPRE STM32_HPRE_DIV1 |
| 54 | #define STM32_PPRE STM32_PPRE_DIV1 | 54 | #define STM32_PPRE STM32_PPRE_DIV1 |
| 55 | #define STM32_ADCSW STM32_ADCSW_HSI14 | 55 | #define STM32_ADCSW STM32_ADCSW_HSI14 |
| 56 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | 56 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 |
| 57 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | 57 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK |
| 58 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | 58 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 |
| 59 | #define STM32_ADCSW STM32_ADCSW_HSI14 | 59 | #define STM32_ADCSW STM32_ADCSW_HSI14 |
| 60 | #define STM32_USBSW STM32_USBSW_HSI48 | 60 | #define STM32_USBSW STM32_USBSW_HSI48 |
| 61 | #define STM32_CECSW STM32_CECSW_HSI | 61 | #define STM32_CECSW STM32_CECSW_HSI |
| 62 | #define STM32_I2C1SW STM32_I2C1SW_HSI | 62 | #define STM32_I2C1SW STM32_I2C1SW_HSI |
| 63 | #define STM32_USART1SW STM32_USART1SW_PCLK | 63 | #define STM32_USART1SW STM32_USART1SW_PCLK |
| 64 | #define STM32_RTCSEL STM32_RTCSEL_LSE | 64 | #define STM32_RTCSEL STM32_RTCSEL_LSE |
| 65 | 65 | ||
| 66 | /* | 66 | /* |
| 67 | * ADC driver system settings. | 67 | * IRQ system settings. |
| 68 | */ | 68 | */ |
| 69 | #define STM32_ADC_USE_ADC1 FALSE | 69 | #define STM32_IRQ_EXTI0_1_IRQ_PRIORITY 3 |
| 70 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | 70 | #define STM32_IRQ_EXTI2_3_IRQ_PRIORITY 3 |
| 71 | #define STM32_ADC_IRQ_PRIORITY 2 | 71 | #define STM32_IRQ_EXTI4_15_IRQ_PRIORITY 3 |
| 72 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 | 72 | #define STM32_IRQ_EXTI16_IRQ_PRIORITY 3 |
| 73 | #define STM32_IRQ_EXTI17_20_IRQ_PRIORITY 3 | ||
| 74 | #define STM32_IRQ_EXTI21_22_IRQ_PRIORITY 3 | ||
| 73 | 75 | ||
| 74 | /* | 76 | /* |
| 75 | * EXT driver system settings. | 77 | * ADC driver system settings. |
| 76 | */ | 78 | */ |
| 77 | #define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 | 79 | #define STM32_ADC_USE_ADC1 FALSE |
| 78 | #define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 | 80 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 |
| 79 | #define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 | 81 | #define STM32_ADC_IRQ_PRIORITY 2 |
| 80 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 3 | 82 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 |
| 81 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 3 | ||
| 82 | 83 | ||
| 83 | /* | 84 | /* |
| 84 | * GPT driver system settings. | 85 | * GPT driver system settings. |
| 85 | */ | 86 | */ |
| 86 | #define STM32_GPT_USE_TIM1 FALSE | 87 | #define STM32_GPT_USE_TIM1 FALSE |
| 87 | #define STM32_GPT_USE_TIM2 FALSE | 88 | #define STM32_GPT_USE_TIM2 FALSE |
| 88 | #define STM32_GPT_USE_TIM3 FALSE | 89 | #define STM32_GPT_USE_TIM3 FALSE |
| 89 | #define STM32_GPT_USE_TIM14 FALSE | 90 | #define STM32_GPT_USE_TIM14 FALSE |
| 90 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 | 91 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 |
| 91 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 | 92 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 |
| 92 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 | 93 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 |
| 93 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 | 94 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 |
| 94 | 95 | ||
| 95 | /* | 96 | /* |
| 96 | * I2C driver system settings. | 97 | * I2C driver system settings. |
| 97 | */ | 98 | */ |
| 98 | #define STM32_I2C_USE_I2C1 TRUE | 99 | #define STM32_I2C_USE_I2C1 TRUE |
| 99 | #define STM32_I2C_USE_I2C2 FALSE | 100 | #define STM32_I2C_USE_I2C2 FALSE |
| 100 | #define STM32_I2C_BUSY_TIMEOUT 50 | 101 | #define STM32_I2C_BUSY_TIMEOUT 50 |
| 101 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 | 102 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 |
| 102 | #define STM32_I2C_I2C2_IRQ_PRIORITY 3 | 103 | #define STM32_I2C_I2C2_IRQ_PRIORITY 3 |
| 103 | #define STM32_I2C_USE_DMA TRUE | 104 | #define STM32_I2C_USE_DMA TRUE |
| 104 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 | 105 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 |
| 105 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 | 106 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 |
| 106 | #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | 107 | #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) |
| 107 | #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | 108 | #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) |
| 108 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | 109 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") |
| 109 | 110 | ||
| 110 | /* | 111 | /* |
| 111 | * ICU driver system settings. | 112 | * ICU driver system settings. |
| 112 | */ | 113 | */ |
| 113 | #define STM32_ICU_USE_TIM1 FALSE | 114 | #define STM32_ICU_USE_TIM1 FALSE |
| 114 | #define STM32_ICU_USE_TIM2 FALSE | 115 | #define STM32_ICU_USE_TIM2 FALSE |
| 115 | #define STM32_ICU_USE_TIM3 FALSE | 116 | #define STM32_ICU_USE_TIM3 FALSE |
| 116 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 | 117 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 |
| 117 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 | 118 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 |
| 118 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 | 119 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 |
| 119 | 120 | ||
| 120 | /* | 121 | /* |
| 121 | * PWM driver system settings. | 122 | * PWM driver system settings. |
| 122 | */ | 123 | */ |
| 123 | #define STM32_PWM_USE_ADVANCED FALSE | 124 | #define STM32_PWM_USE_ADVANCED FALSE |
| 124 | #define STM32_PWM_USE_TIM1 FALSE | 125 | #define STM32_PWM_USE_TIM1 FALSE |
| 125 | #define STM32_PWM_USE_TIM2 FALSE | 126 | #define STM32_PWM_USE_TIM2 FALSE |
| 126 | #define STM32_PWM_USE_TIM3 TRUE | 127 | #define STM32_PWM_USE_TIM3 TRUE |
| 127 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 | 128 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 |
| 128 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 | 129 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 |
| 129 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 | 130 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 |
| 130 | 131 | ||
| 131 | /* | 132 | /* |
| 132 | * SERIAL driver system settings. | 133 | * SERIAL driver system settings. |
| 133 | */ | 134 | */ |
| 134 | #define STM32_SERIAL_USE_USART1 FALSE | 135 | #define STM32_SERIAL_USE_USART1 FALSE |
| 135 | #define STM32_SERIAL_USE_USART2 FALSE | 136 | #define STM32_SERIAL_USE_USART2 FALSE |
| 136 | #define STM32_SERIAL_USART1_PRIORITY 3 | 137 | #define STM32_SERIAL_USART1_PRIORITY 3 |
| 137 | #define STM32_SERIAL_USART2_PRIORITY 3 | 138 | #define STM32_SERIAL_USART2_PRIORITY 3 |
| 138 | 139 | ||
| 139 | /* | 140 | /* |
| 140 | * SPI driver system settings. | 141 | * SPI driver system settings. |
| 141 | */ | 142 | */ |
| 142 | #define STM32_SPI_USE_SPI1 FALSE | 143 | #define STM32_SPI_USE_SPI1 FALSE |
| 143 | #define STM32_SPI_USE_SPI2 TRUE | 144 | #define STM32_SPI_USE_SPI2 TRUE |
| 144 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | 145 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 |
| 145 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | 146 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 |
| 146 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 | 147 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 |
| 147 | #define STM32_SPI_SPI2_IRQ_PRIORITY 2 | 148 | #define STM32_SPI_SPI2_IRQ_PRIORITY 2 |
| 148 | #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | 149 | #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) |
| 149 | #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | 150 | #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) |
| 150 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | 151 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") |
| 151 | 152 | ||
| 152 | /* | 153 | /* |
| 153 | * ST driver system settings. | 154 | * ST driver system settings. |
| 154 | */ | 155 | */ |
| 155 | #define STM32_ST_IRQ_PRIORITY 2 | 156 | #define STM32_ST_IRQ_PRIORITY 2 |
| 156 | #define STM32_ST_USE_TIMER 2 | 157 | #define STM32_ST_USE_TIMER 2 |
| 157 | 158 | ||
| 158 | /* | 159 | /* |
| 159 | * UART driver system settings. | 160 | * UART driver system settings. |
| 160 | */ | 161 | */ |
| 161 | #define STM32_UART_USE_USART1 FALSE | 162 | #define STM32_UART_USE_USART1 FALSE |
| 162 | #define STM32_UART_USE_USART2 FALSE | 163 | #define STM32_UART_USE_USART2 FALSE |
| 163 | #define STM32_UART_USART1_IRQ_PRIORITY 3 | 164 | #define STM32_UART_USART1_IRQ_PRIORITY 3 |
| 164 | #define STM32_UART_USART2_IRQ_PRIORITY 3 | 165 | #define STM32_UART_USART2_IRQ_PRIORITY 3 |
| 165 | #define STM32_UART_USART1_DMA_PRIORITY 0 | 166 | #define STM32_UART_USART1_DMA_PRIORITY 0 |
| 166 | #define STM32_UART_USART2_DMA_PRIORITY 0 | 167 | #define STM32_UART_USART2_DMA_PRIORITY 0 |
| 167 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | 168 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") |
| 168 | 169 | ||
| 169 | /* | 170 | /* |
| 170 | * USB driver system settings. | 171 | * USB driver system settings. |
| 171 | */ | 172 | */ |
| 172 | #define STM32_USB_USE_USB1 TRUE | 173 | #define STM32_USB_USE_USB1 TRUE |
| 173 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | 174 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE |
| 174 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 | 175 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 |
| 175 | 176 | ||
| 176 | #endif /* _MCUCONF_H_ */ | 177 | #endif /* _MCUCONF_H_ */ |
