drivers: nxstyle fixes

nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-03-20 17:40:27 +01:00 committed by Xiang Xiao
parent b8175f2841
commit 0abc1017ab
2 changed files with 15 additions and 11 deletions

View File

@ -117,14 +117,16 @@ static int ina226_access(FAR struct ina226_dev_s *priv,
struct i2c_msg_s msg[I2C_NOSTARTSTOP_MSGS];
int ret;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].frequency = CONFIG_INA226_I2C_FREQUENCY;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].frequency =
CONFIG_INA226_I2C_FREQUENCY;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].addr = priv->addr;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].flags = 0;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].buffer = &start_register_address;
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].length = 1;
msg[I2C_NOSTARTSTOP_DATA_MSG_INDEX].addr = msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].addr;
msg[I2C_NOSTARTSTOP_DATA_MSG_INDEX].addr =
msg[I2C_NOSTARTSTOP_ADDRESS_MSG_INDEX].addr;
msg[I2C_NOSTARTSTOP_DATA_MSG_INDEX].flags = reading ? I2C_M_READ : 0;
msg[I2C_NOSTARTSTOP_DATA_MSG_INDEX].buffer = register_value;
msg[I2C_NOSTARTSTOP_DATA_MSG_INDEX].length = data_length;
@ -196,7 +198,7 @@ static int ina226_readpower(FAR struct ina226_dev_s *priv,
/* Convert register value to bus voltage */
buffer->voltage = ((uint32_t)reg) * BV_LSB; /* 1 LSB 1,25mV*/
buffer->voltage = ((uint32_t)reg) * BV_LSB; /* 1 LSB 1,25mV */
/* Read the raw shunt voltage */

View File

@ -61,14 +61,16 @@
/* Formula for calculating default macMaxFrameWaitTime is on pg. 130
*
* For PHYs other than CSS and UWB, the attribute phyMaxFrameDuration is given by:
* For PHYs other than CSS and UWB, the attribute phyMaxFrameDuration
* is given by:
*
* phyMaxFrameDuration = phySHRDuration +
* ceiling([aMaxPHYPacketSize + 1] x phySymbolsPerOctet)
* ceiling([aMaxPHYPacketSize + 1] x
* phySymbolsPerOctet)
*
* where ceiling() is a function that returns the smallest integer value greater
* than or equal to its argument value. [1] pg. 158
*/
* where ceiling() is a function that returns the smallest integer value
* greater than or equal to its argument value. [1] pg. 158
*/
#define MRF24J40_DEFAULT_MAX_FRAME_WAITTIME 1824
@ -82,7 +84,7 @@
#define MRF24J40_SUPERFRAMEDURATION_NSEC(sforder) \
(IEEE802154_BASE_SUPERFRAME_DURATION * (1 << sforder) * (16 * 1000))
/* Configuration *************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_SCHED_HPWORK
# error High priority work queue required in this driver
@ -108,7 +110,7 @@
struct mrf24j40_radio_s
{
struct ieee802154_radio_s radio; /* The public device instance */
struct ieee802154_radio_s radio; /* The public device instance */
FAR struct ieee802154_radiocb_s *radiocb; /* Registered callbacks */
/* Low-level MCU-specific support */
@ -186,7 +188,7 @@ static inline void mrf24j40_spi_lock(FAR struct spi_dev_s *spi)
static inline void mrf24j40_spi_unlock(FAR struct spi_dev_s *spi)
{
SPI_LOCK(spi,0);
SPI_LOCK(spi, 0);
}
/****************************************************************************