More style fixes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12802 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
4bca2e749d
commit
4f7cf535be
|
@ -64,7 +64,6 @@
|
|||
#define MSG_WAIT (msg_t)-10
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* @name Special time constants
|
||||
* @{
|
||||
|
|
|
@ -225,7 +225,7 @@ typedef void (*stm32_bdmaisr_t)(void *p, uint32_t flags);
|
|||
* @brief STM32 BDMA stream descriptor structure.
|
||||
*/
|
||||
typedef struct {
|
||||
BDMA_TypeDef *bdma ; /**< @brief Associated BDMA. */
|
||||
BDMA_TypeDef *bdma; /**< @brief Associated BDMA. */
|
||||
BDMA_Channel_TypeDef *channel; /**< @brief Associated BDMA channel.*/
|
||||
uint8_t shift; /**< @brief Bit offset in ISR and
|
||||
IFCR registers. */
|
||||
|
|
|
@ -83,7 +83,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
const CANFilter *cfp) {
|
||||
|
||||
#if STM32_CAN_USE_CAN2
|
||||
if(canp == &CAND2) {
|
||||
if (canp == &CAND2) {
|
||||
/* Set handle to CAN1, because CAN1 manages the filters of CAN2.*/
|
||||
canp = &CAND1;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
|
||||
/* Temporarily enabling CAN clock.*/
|
||||
#if STM32_CAN_USE_CAN1
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
rccEnableCAN1(true);
|
||||
/* Filters initialization.*/
|
||||
canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | CAN_FMR_FINIT;
|
||||
|
@ -100,7 +100,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
#endif
|
||||
|
||||
#if STM32_CAN_USE_CAN3
|
||||
if(canp == &CAND3) {
|
||||
if (canp == &CAND3) {
|
||||
rccEnableCAN3(true);
|
||||
/* Filters initialization.*/
|
||||
canp->can->FMR = (canp->can->FMR & 0xFFFF0000) | CAN_FMR_FINIT;
|
||||
|
@ -117,7 +117,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
canp->can->FFA1R = 0;
|
||||
|
||||
#if STM32_CAN_USE_CAN1
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
for (i = 0; i < STM32_CAN_MAX_FILTERS; i++) {
|
||||
canp->can->sFilterRegister[i].FR1 = 0;
|
||||
canp->can->sFilterRegister[i].FR2 = 0;
|
||||
|
@ -126,7 +126,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
#endif
|
||||
|
||||
#if STM32_CAN_USE_CAN3
|
||||
if(canp == &CAND3) {
|
||||
if (canp == &CAND3) {
|
||||
for (i = 0; i < STM32_CAN3_MAX_FILTERS; i++) {
|
||||
canp->can->sFilterRegister[i].FR1 = 0;
|
||||
canp->can->sFilterRegister[i].FR2 = 0;
|
||||
|
@ -155,7 +155,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
canp->can->sFilterRegister[0].FR1 = 0;
|
||||
canp->can->sFilterRegister[0].FR2 = 0;
|
||||
#if STM32_CAN_USE_CAN2
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
canp->can->sFilterRegister[can2sb].FR1 = 0;
|
||||
canp->can->sFilterRegister[can2sb].FR2 = 0;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
canp->can->FS1R = 1;
|
||||
canp->can->FA1R = 1;
|
||||
#if STM32_CAN_USE_CAN2
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
canp->can->FS1R |= 1 << can2sb;
|
||||
canp->can->FA1R |= 1 << can2sb;
|
||||
}
|
||||
|
@ -176,12 +176,12 @@ static void can_lld_set_filters(CANDriver* canp,
|
|||
/* Clock disabled, it will be enabled again in can_lld_start().*/
|
||||
/* Temporarily enabling CAN clock.*/
|
||||
#if STM32_CAN_USE_CAN1
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
rccDisableCAN1();
|
||||
}
|
||||
#endif
|
||||
#if STM32_CAN_USE_CAN3
|
||||
if(canp == &CAND3) {
|
||||
if (canp == &CAND3) {
|
||||
rccDisableCAN3();
|
||||
}
|
||||
#endif
|
||||
|
@ -1000,12 +1000,12 @@ void canSTM32SetFilters(CANDriver *canp, uint32_t can2sb,
|
|||
#endif
|
||||
|
||||
#if STM32_CAN_USE_CAN1
|
||||
if(canp == &CAND1) {
|
||||
if (canp == &CAND1) {
|
||||
can_lld_set_filters(canp, can2sb, num, cfp);
|
||||
}
|
||||
#endif
|
||||
#if STM32_CAN_USE_CAN3
|
||||
if(canp == &CAND3) {
|
||||
if (canp == &CAND3) {
|
||||
can_lld_set_filters(canp, can2sb, num, cfp);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -371,7 +371,6 @@ typedef enum {
|
|||
/* Associated DMA.*/ \
|
||||
const stm32_dma_stream_t *dma
|
||||
|
||||
|
||||
/**
|
||||
* @brief Low level fields of the DAC configuration structure.
|
||||
*/
|
||||
|
|
|
@ -286,7 +286,7 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
|
|||
* @brief STM32 DMA stream descriptor structure.
|
||||
*/
|
||||
typedef struct {
|
||||
DMA_TypeDef *dma ; /**< @brief Associated DMA. */
|
||||
DMA_TypeDef *dma; /**< @brief Associated DMA. */
|
||||
DMA_Channel_TypeDef *channel; /**< @brief Associated DMA channel. */
|
||||
uint32_t cmask; /**< @brief Mask of streams sharing
|
||||
the same ISR. */
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
*/
|
||||
#define STM32_DMA2_STREAMS_MASK 0x0000FF00U
|
||||
|
||||
|
||||
#if STM32_DMA_SUPPORTS_DMAMUX == TRUE
|
||||
|
||||
#define DMA1_CH0_VARIANT DMAMUX1_Channel0
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#if 0
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ I2CDriver I2CD4;
|
|||
static inline void i2c_lld_start_rx_dma(I2CDriver *i2cp) {
|
||||
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ static inline void i2c_lld_start_rx_dma(I2CDriver *i2cp) {
|
|||
static inline void i2c_lld_start_tx_dma(I2CDriver *i2cp) {
|
||||
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ static inline void i2c_lld_start_tx_dma(I2CDriver *i2cp) {
|
|||
static inline void i2c_lld_stop_rx_dma(I2CDriver *i2cp) {
|
||||
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ static inline void i2c_lld_stop_rx_dma(I2CDriver *i2cp) {
|
|||
static inline void i2c_lld_stop_tx_dma(I2CDriver *i2cp) {
|
||||
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -797,7 +797,7 @@ void i2c_lld_start(I2CDriver *i2cp) {
|
|||
#if STM32_I2C_USE_DMA == TRUE
|
||||
/* Common DMA modes.*/
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -928,7 +928,7 @@ void i2c_lld_start(I2CDriver *i2cp) {
|
|||
#if STM32_I2C_USE_DMA == TRUE
|
||||
/* I2C registers pointed by the DMA.*/
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -977,7 +977,7 @@ void i2c_lld_stop(I2CDriver *i2cp) {
|
|||
i2c_lld_abort_operation(i2cp);
|
||||
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -1062,7 +1062,7 @@ msg_t i2c_lld_master_receive_timeout(I2CDriver *i2cp, i2caddr_t addr,
|
|||
#if STM32_I2C_USE_DMA == TRUE
|
||||
/* RX DMA setup.*/
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -1185,7 +1185,7 @@ msg_t i2c_lld_master_transmit_timeout(I2CDriver *i2cp, i2caddr_t addr,
|
|||
#if STM32_I2C_USE_DMA == TRUE
|
||||
/* TX and RX DMA setup.*/
|
||||
#if defined(STM32_I2C_DMA_REQUIRED) && defined(STM32_I2C_BDMA_REQUIRED)
|
||||
if(i2cp->is_bdma)
|
||||
if (i2cp->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_I2C_BDMA_REQUIRED)
|
||||
{
|
||||
|
|
|
@ -320,7 +320,7 @@ void mac_lld_start(MACDriver *macp) {
|
|||
rccEnableETH(true);
|
||||
#if defined(STM32_MAC_DMABMR_SR)
|
||||
ETH->DMABMR |= ETH_DMABMR_SR;
|
||||
while(ETH->DMABMR & ETH_DMABMR_SR)
|
||||
while (ETH->DMABMR & ETH_DMABMR_SR)
|
||||
;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ static void otg_fifo_read_to_buffer(volatile uint32_t *fifop,
|
|||
size_t i = 0;
|
||||
|
||||
while (i < n) {
|
||||
if ((i & 3) == 0){
|
||||
if ((i & 3) == 0) {
|
||||
w = *fifop;
|
||||
}
|
||||
if (i < max) {
|
||||
|
|
|
@ -556,7 +556,7 @@ struct USBDriver {
|
|||
* @notapi
|
||||
*/
|
||||
#define usb_lld_wakeup_host(usbp) \
|
||||
do{ \
|
||||
do { \
|
||||
(usbp)->otg->DCTL |= DCTL_RWUSIG; \
|
||||
osalThreadSleepMilliseconds(STM32_USB_HOST_WAKEUP_DURATION); \
|
||||
(usbp)->otg->DCTL &= ~DCTL_RWUSIG; \
|
||||
|
|
|
@ -647,7 +647,7 @@ bool sdc_lld_read_special(SDCDriver *sdcp, uint8_t *buf, size_t bytes,
|
|||
uint8_t cmd, uint32_t arg) {
|
||||
uint32_t resp[1];
|
||||
|
||||
if(sdc_lld_prepare_read_bytes(sdcp, buf, bytes))
|
||||
if (sdc_lld_prepare_read_bytes(sdcp, buf, bytes))
|
||||
goto error;
|
||||
|
||||
if (sdc_lld_send_cmd_short_crc(sdcp, cmd, arg, resp)
|
||||
|
|
|
@ -606,7 +606,7 @@ void spi_lld_start(SPIDriver *spip) {
|
|||
|
||||
/* DMA setup.*/
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -628,7 +628,7 @@ void spi_lld_start(SPIDriver *spip) {
|
|||
/* Configuration-specific DMA setup.*/
|
||||
dsize = (spip->config->cfg1 & SPI_CFG1_DSIZE_Msk) + 1U;
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -733,7 +733,7 @@ void spi_lld_stop(SPIDriver *spip) {
|
|||
spip->spi->CFG2 = 0U;
|
||||
spip->spi->IER = 0U;
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -821,7 +821,7 @@ void spi_lld_ignore(SPIDriver *spip, size_t n) {
|
|||
osalDbgAssert(n < 65536, "unsupported DMA transfer size");
|
||||
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -879,7 +879,7 @@ void spi_lld_exchange(SPIDriver *spip, size_t n,
|
|||
osalDbgAssert(n < 65536, "unsupported DMA transfer size");
|
||||
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -934,7 +934,7 @@ void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
|
|||
osalDbgAssert(n < 65536, "unsupported DMA transfer size");
|
||||
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -989,7 +989,7 @@ void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {
|
|||
osalDbgAssert(n < 65536, "unsupported DMA transfer size");
|
||||
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
@ -1041,7 +1041,7 @@ void spi_lld_abort(SPIDriver *spip) {
|
|||
|
||||
/* Stopping DMAs.*/
|
||||
#if defined(STM32_SPI_DMA_REQUIRED) && defined(STM32_SPI_BDMA_REQUIRED)
|
||||
if(spip->is_bdma)
|
||||
if (spip->is_bdma)
|
||||
#endif
|
||||
#if defined(STM32_SPI_BDMA_REQUIRED)
|
||||
{
|
||||
|
|
|
@ -235,8 +235,8 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
|
|||
|
||||
/* Baud rate setting.*/
|
||||
#if STM32_SERIAL_USE_LPUART1
|
||||
if ( sdp == &LPSD1 ) {
|
||||
fck = (uint32_t)(((uint64_t)sdp->clock * 256 ) / config->speed);
|
||||
if (sdp == &LPSD1) {
|
||||
fck = (uint32_t)(((uint64_t)sdp->clock * 256) / config->speed);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -465,7 +465,7 @@ struct USBDriver {
|
|||
* @notapi
|
||||
*/
|
||||
#define usb_lld_wakeup_host(usbp) \
|
||||
do{ \
|
||||
do { \
|
||||
STM32_USB->CNTR |= USB_CNTR_RESUME; \
|
||||
osalThreadSleepMilliseconds(USB_HOST_WAKEUP_DURATION); \
|
||||
STM32_USB->CNTR &= ~USB_CNTR_RESUME; \
|
||||
|
|
|
@ -60,7 +60,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
PWR->CR |= PWR_CR_DBP;
|
||||
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->BDCR = RCC_BDCR_BDRST;
|
||||
RCC->BDCR = 0;
|
||||
|
|
|
@ -67,7 +67,6 @@ static const flash_descriptor_t efl_lld_descriptor = {
|
|||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
|
||||
static inline void stm32_flash_lock(EFlashDriver *eflp) {
|
||||
|
||||
eflp->flash->CR |= FLASH_CR_LOCK;
|
||||
|
@ -305,8 +304,7 @@ flash_error_t efl_lld_program(void *instance, flash_offset_t offset,
|
|||
break;
|
||||
}
|
||||
/* Check for flash error.*/
|
||||
if(address[0] != line.hw[0])
|
||||
{
|
||||
if (address[0] != line.hw[0]) {
|
||||
err = FLASH_ERROR_PROGRAM;
|
||||
break;
|
||||
}
|
||||
|
@ -400,7 +398,7 @@ flash_error_t efl_lld_start_erase_sector(void *instance,
|
|||
*
|
||||
* @api
|
||||
*/
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *wait_time){
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *wait_time) {
|
||||
EFlashDriver *devp = (EFlashDriver *)instance;
|
||||
flash_error_t err;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
|
||||
#if HAL_USE_RTC
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->BDCR = RCC_BDCR_BDRST;
|
||||
RCC->BDCR = 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
PWR->CR |= PWR_CR_DBP;
|
||||
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->BDCR = RCC_BDCR_BDRST;
|
||||
RCC->BDCR = 0;
|
||||
|
|
|
@ -742,7 +742,6 @@
|
|||
*/
|
||||
#define rccResetTIM13() rccResetAPB1(RCC_APB1RSTR_TIM13RST)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enables the TIM14 peripheral clock.
|
||||
*
|
||||
|
|
|
@ -57,7 +57,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
PWR->CR |= PWR_CR_DBP;
|
||||
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->BDCR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->BDCR = RCC_BDCR_BDRST;
|
||||
RCC->BDCR = 0;
|
||||
|
|
|
@ -1178,7 +1178,6 @@
|
|||
#error "invalid VDD voltage specified"
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(STM32F401xx)
|
||||
#if (STM32_VDD >= 270) && (STM32_VDD <= 360)
|
||||
#define STM32_0WS_THRESHOLD 30000000
|
||||
|
|
|
@ -55,7 +55,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
PWR->CR |= PWR_CR_DBP;
|
||||
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->CSR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->CSR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->CSR |= RCC_CSR_RTCRST;
|
||||
RCC->CSR &= ~RCC_CSR_RTCRST;
|
||||
|
@ -64,7 +64,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
/* If enabled then the LSE is started.*/
|
||||
#if STM32_LSE_ENABLED
|
||||
RCC->CSR |= RCC_CSR_LSEON;
|
||||
while ((RCC->CSR & RCC_CSR_LSERDY) == 0)
|
||||
while ((RCC->CSR & RCC_CSR_LSERDY) == 0) {
|
||||
; /* Waits until LSE is stable. */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static void hal_lld_backup_domain_init(void) {
|
|||
PWR->CR |= PWR_CR_DBP;
|
||||
|
||||
/* Reset BKP domain if different clock source selected.*/
|
||||
if ((RCC->CSR & STM32_RTCSEL_MASK) != STM32_RTCSEL){
|
||||
if ((RCC->CSR & STM32_RTCSEL_MASK) != STM32_RTCSEL) {
|
||||
/* Backup domain reset.*/
|
||||
RCC->CSR |= RCC_CSR_RTCRST;
|
||||
RCC->CSR &= ~RCC_CSR_RTCRST;
|
||||
|
|
|
@ -114,7 +114,6 @@ static const EFlashConfig efl_lld_config = {
|
|||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
|
||||
static inline void stm32_flash_lock(EFlashDriver *eflp) {
|
||||
|
||||
eflp->flash->CR |= FLASH_CR_LOCK;
|
||||
|
@ -511,7 +510,7 @@ flash_error_t efl_lld_start_erase_sector(void *instance,
|
|||
*
|
||||
* @api
|
||||
*/
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *msec){
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *msec) {
|
||||
EFlashDriver *devp = (EFlashDriver *)instance;
|
||||
flash_error_t err;
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ static const flash_descriptor_t efl_lld_descriptor = {
|
|||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
|
||||
static inline void stm32_flash_lock(EFlashDriver *eflp) {
|
||||
|
||||
eflp->flash->CR |= FLASH_CR_LOCK;
|
||||
|
@ -447,7 +446,7 @@ flash_error_t efl_lld_start_erase_sector(void *instance,
|
|||
*
|
||||
* @api
|
||||
*/
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *msec){
|
||||
flash_error_t efl_lld_query_erase(void *instance, uint32_t *msec) {
|
||||
EFlashDriver *devp = (EFlashDriver *)instance;
|
||||
flash_error_t err;
|
||||
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
find ../../os/hal/include -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
|
||||
find ../../os/hal/src -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
|
||||
find ../../os/hal/templates -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
|
||||
find ../../os/hal/osal -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
|
||||
find ../../os/hal/ports/STM32 -name "*.[ch]" -exec perl stylecheck.pl "{}" \;
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ foreach my $line (@c_source) {
|
|||
|
||||
#****************************************************************************
|
||||
# Check on loose semicolons.
|
||||
if ($line =~ /\s;/) {
|
||||
if ($line =~ /\S\s;/) {
|
||||
style "detected loose semicolon";
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ foreach my $line (@c_source) {
|
|||
if ($line =~ /\(\s+/) {
|
||||
style "detected loose \"(\"";
|
||||
}
|
||||
if ($line =~ /\s+\)/) {
|
||||
if ($line =~ /\S\s+\)/) {
|
||||
style "detected loose \")\"";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue