STM32F3 : correct ST HAL API call

- CAN: compilation issue with assert enabled
- GPIO: mode was not allowed by ST HAL API
pull/3390/head
jeromecoutant 2016-12-09 14:56:52 +01:00
parent d30c34c5d1
commit 4ea65df99d
6 changed files with 8 additions and 8 deletions
targets/TARGET_STM/TARGET_STM32F3
TARGET_NUCLEO_F302R8/device
TARGET_NUCLEO_F303K8/device
TARGET_NUCLEO_F303RE/device
TARGET_NUCLEO_F303ZE/device
TARGET_NUCLEO_F334R8/device

View File

@ -11857,7 +11857,7 @@ typedef struct
#define IS_ADC_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == ADC1_COMMON)
/****************************** CAN Instances *********************************/
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN1)
/****************************** COMP Instances ********************************/
#define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP2) || \

View File

@ -11626,7 +11626,7 @@ typedef struct
#define IS_ADC_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == ADC12_COMMON)
/****************************** CAN Instances *********************************/
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN1)
/****************************** COMP Instances ********************************/
#define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP2) || \

View File

@ -14509,7 +14509,7 @@ typedef struct
((INSTANCE) == ADC34_COMMON))
/****************************** CAN Instances *********************************/
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN1)
/****************************** COMP Instances ********************************/
#define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP1) || \

View File

@ -14509,7 +14509,7 @@ typedef struct
((INSTANCE) == ADC34_COMMON))
/****************************** CAN Instances *********************************/
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN1)
/****************************** COMP Instances ********************************/
#define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP1) || \

View File

@ -14581,7 +14581,7 @@ typedef struct
#define IS_ADC_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == ADC12_COMMON)
/****************************** CAN Instances *********************************/
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
#define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN1)
/****************************** COMP Instances ********************************/
#define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP2) || \

View File

@ -277,7 +277,7 @@ void gpio_irq_free(gpio_irq_t *obj)
void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
{
uint32_t mode = STM_MODE_IT_EVT_RESET;
uint32_t mode = STM_MODE_INPUT;
if (enable) {
if (event == IRQ_RISE) {
@ -304,7 +304,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
mode = STM_MODE_IT_FALLING;
obj->event = EDGE_FALL;
} else { // NONE or RISE
mode = STM_MODE_IT_EVT_RESET;
mode = STM_MODE_INPUT;
obj->event = EDGE_NONE;
}
}
@ -313,7 +313,7 @@ void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
mode = STM_MODE_IT_RISING;
obj->event = EDGE_RISE;
} else { // NONE or FALL
mode = STM_MODE_IT_EVT_RESET;
mode = STM_MODE_INPUT;
obj->event = EDGE_NONE;
}
}