mirror of https://github.com/ARMmbed/mbed-os.git
[NUCLEO_F334R8] Typo corrections (astyle)
parent
2fb9552913
commit
307f641d14
|
@ -59,7 +59,8 @@ I2C_HandleTypeDef I2cHandle;
|
|||
|
||||
int i2c1_inited = 0;
|
||||
|
||||
void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
|
||||
void i2c_init(i2c_t *obj, PinName sda, PinName scl)
|
||||
{
|
||||
// Determine the I2C to use
|
||||
I2CName i2c_sda = (I2CName)pinmap_peripheral(sda, PinMap_I2C_SDA);
|
||||
I2CName i2c_scl = (I2CName)pinmap_peripheral(scl, PinMap_I2C_SCL);
|
||||
|
@ -68,7 +69,7 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
|
|||
MBED_ASSERT(obj->i2c != (I2CName)NC);
|
||||
|
||||
// Enable I2C1 clock and pinout if not done
|
||||
if ((obj->i2c == I2C_1)&& !i2c1_inited) {
|
||||
if ((obj->i2c == I2C_1) && !i2c1_inited) {
|
||||
i2c1_inited = 1;
|
||||
__HAL_RCC_I2C1_CONFIG(RCC_I2C1CLKSOURCE_SYSCLK);
|
||||
__I2C1_CLK_ENABLE();
|
||||
|
@ -97,7 +98,7 @@ void i2c_frequency(i2c_t *obj, int hz)
|
|||
|
||||
// wait before init
|
||||
timeout = LONG_TIMEOUT;
|
||||
while((__HAL_I2C_GET_FLAG(&I2cHandle, I2C_FLAG_BUSY)) && (timeout-- != 0));
|
||||
while ((__HAL_I2C_GET_FLAG(&I2cHandle, I2C_FLAG_BUSY)) && (timeout-- != 0));
|
||||
|
||||
// Update the SystemCoreClock variable.
|
||||
SystemCoreClockUpdate();
|
||||
|
@ -320,10 +321,10 @@ int i2c_byte_write(i2c_t *obj, int data)
|
|||
void i2c_reset(i2c_t *obj)
|
||||
{
|
||||
int timeout;
|
||||
|
||||
|
||||
// wait before reset
|
||||
timeout = LONG_TIMEOUT;
|
||||
while((__HAL_I2C_GET_FLAG(&I2cHandle, I2C_FLAG_BUSY)) && (timeout-- != 0));
|
||||
while ((__HAL_I2C_GET_FLAG(&I2cHandle, I2C_FLAG_BUSY)) && (timeout-- != 0));
|
||||
|
||||
__I2C1_FORCE_RESET();
|
||||
__I2C1_RELEASE_RESET();
|
||||
|
|
|
@ -94,7 +94,7 @@ static void init_uart(serial_t *obj)
|
|||
// Disable the reception overrun detection
|
||||
UartHandle.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_RXOVERRUNDISABLE_INIT;
|
||||
UartHandle.AdvancedInit.OverrunDisable = UART_ADVFEATURE_OVERRUN_DISABLE;
|
||||
|
||||
|
||||
HAL_UART_Init(&UartHandle);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ void us_ticker_init(void)
|
|||
|
||||
TimMasterHandle.Instance = TIM_MST;
|
||||
|
||||
HAL_InitTick(0); // The passed value is not used
|
||||
HAL_InitTick(0); // The passed value is not used
|
||||
}
|
||||
|
||||
uint32_t us_ticker_read()
|
||||
|
|
Loading…
Reference in New Issue