mirror of https://github.com/ARMmbed/mbed-os.git
TARGET_STM32F2 astyle
parent
c8313901fb
commit
f9bd4768a5
|
@ -130,10 +130,11 @@ static inline void stm_pin_SetAFPin( GPIO_TypeDef *gpio, PinName pin, uint32_t a
|
|||
{
|
||||
uint32_t ll_pin = ll_pin_defines[STM_PIN(pin)];
|
||||
|
||||
if (STM_PIN(pin) > 7)
|
||||
if (STM_PIN(pin) > 7) {
|
||||
LL_GPIO_SetAFPin_8_15(gpio, ll_pin, afnum);
|
||||
else
|
||||
} else {
|
||||
LL_GPIO_SetAFPin_0_7(gpio, ll_pin, afnum);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
|
||||
#ifdef DEVICE_PWMOUT
|
||||
|
||||
const pwm_apb_map_t pwm_apb_map_table[] =
|
||||
{
|
||||
const pwm_apb_map_t pwm_apb_map_table[] = {
|
||||
#if defined(TIM2_BASE)
|
||||
{PWM_2, PWMOUT_ON_APB1},
|
||||
#endif
|
||||
|
|
|
@ -526,13 +526,15 @@ uint8_t serial_rx_active(serial_t *obj)
|
|||
return ((HAL_UART_GetState(huart) == HAL_UART_STATE_BUSY_RX) ? 1 : 0);
|
||||
}
|
||||
|
||||
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) {
|
||||
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
|
||||
{
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TC) != RESET) {
|
||||
__HAL_UART_CLEAR_FLAG(huart, UART_FLAG_TC);
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) {
|
||||
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
|
||||
{
|
||||
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_PE) != RESET) {
|
||||
volatile uint32_t tmpval __attribute__((unused)) = huart->Instance->DR; // Clear PE flag
|
||||
} else if (__HAL_UART_GET_FLAG(huart, UART_FLAG_FE) != RESET) {
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
* Only the frequency is managed in the family specific part
|
||||
* the rest of SPI management is common to all STM32 families
|
||||
*/
|
||||
int spi_get_clock_freq(spi_t *obj) {
|
||||
int spi_get_clock_freq(spi_t *obj)
|
||||
{
|
||||
struct spi_s *spiobj = SPI_S(obj);
|
||||
int spi_hz = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue