mirror of https://github.com/ARMmbed/mbed-os.git
STM32 common filess astyle
parent
8b1cd98a8e
commit
c02cb71b35
|
@ -1126,8 +1126,7 @@ int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t
|
|||
sFilterConfig.FilterActivation = ENABLE;
|
||||
sFilterConfig.BankNumber = 14;
|
||||
|
||||
if (HAL_CAN_ConfigFilter(&obj->CanHandle, &sFilterConfig) == HAL_OK)
|
||||
{
|
||||
if (HAL_CAN_ConfigFilter(&obj->CanHandle, &sFilterConfig) == HAL_OK) {
|
||||
success = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ extern void SetSysClock(void);
|
|||
|
||||
/**
|
||||
* @brief configure the LSE crystal driver load
|
||||
* This settings ist target hardware dependend and
|
||||
* This setting is target hardware dependend and
|
||||
* depends on the crystal that is used for LSE clock.
|
||||
* For low power requirements, crystals with low load capacitors can be used and
|
||||
* driver setting is RCC_LSEDRIVE_LOW.
|
||||
|
@ -58,7 +58,8 @@ extern void SetSysClock(void);
|
|||
* @retval None
|
||||
*/
|
||||
|
||||
static void LSEDriveConfig(void) {
|
||||
static void LSEDriveConfig(void)
|
||||
{
|
||||
HAL_PWR_EnableBkUpAccess();
|
||||
#if defined(__HAL_RCC_LSEDRIVE_CONFIG)
|
||||
__HAL_RCC_LSEDRIVE_CONFIG(LSE_DRIVE_LOAD_LEVEL);
|
||||
|
@ -79,13 +80,15 @@ static void LSEDriveConfig(void) {
|
|||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
MBED_WEAK void TargetBSP_Init(void) {
|
||||
MBED_WEAK void TargetBSP_Init(void)
|
||||
{
|
||||
/** Do nothing */
|
||||
}
|
||||
|
||||
#ifndef MBED_DEBUG
|
||||
#if MBED_CONF_TARGET_GPIO_RESET_AT_INIT
|
||||
void GPIO_Full_Init(void) {
|
||||
void GPIO_Full_Init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_All;
|
||||
|
@ -290,8 +293,7 @@ void mbed_sdk_init()
|
|||
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
||||
PeriphClkInitStruct.RTCClockSelection = (RCC_RTCCLKSOURCE_HSE_DIVX | RTC_HSE_DIV << 16);
|
||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
|
||||
{
|
||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
|
||||
error("PeriphClkInitStruct RTC failed with HSE\n");
|
||||
}
|
||||
#elif ((MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_LSE_OR_LSI) && !MBED_CONF_TARGET_LSE_AVAILABLE) || (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_LSI)
|
||||
|
|
|
@ -404,7 +404,8 @@ ospi_status_t ospi_init(ospi_t *obj, PinName io0, PinName io1, PinName io2, PinN
|
|||
|
||||
const ospi_pinmap_t static_pinmap = {peripheral, io0, function_io0, io1, function_io1, io2, function_io2, io3, function_io3,
|
||||
io4, function_io4, io5, function_io5, io6, function_io6, io7, function_io7,
|
||||
sclk, function_sclk, ssel, function_ssel, dqs, function_dqs};
|
||||
sclk, function_sclk, ssel, function_ssel, dqs, function_dqs
|
||||
};
|
||||
|
||||
return OSPI_INIT_DIRECT(obj, &static_pinmap, hz, mode);
|
||||
}
|
||||
|
|
|
@ -667,7 +667,8 @@ static inline int ssp_busy(spi_t *obj)
|
|||
return status;
|
||||
}
|
||||
|
||||
static inline int datasize_to_transfer_bitshift(uint32_t DataSize) {
|
||||
static inline int datasize_to_transfer_bitshift(uint32_t DataSize)
|
||||
{
|
||||
switch (DataSize) {
|
||||
#if defined(SPI_DATASIZE_4BIT)
|
||||
case SPI_DATASIZE_4BIT:
|
||||
|
|
Loading…
Reference in New Issue