zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ee6fa31af6
commit
a1b77fd589
2364 changed files with 32505 additions and 32505 deletions
|
@ -31,13 +31,13 @@ LOG_MODULE_REGISTER(LIS2DW12, CONFIG_SENSOR_LOG_LEVEL);
|
|||
* @dev: Pointer to instance of struct device (I2C or SPI)
|
||||
* @range: Full scale range (2, 4, 8 and 16 G)
|
||||
*/
|
||||
static int lis2dw12_set_range(struct device *dev, u16_t range)
|
||||
static int lis2dw12_set_range(struct device *dev, uint16_t range)
|
||||
{
|
||||
int err;
|
||||
struct lis2dw12_data *lis2dw12 = dev->driver_data;
|
||||
const struct lis2dw12_device_config *cfg = dev->config_info;
|
||||
u8_t shift_gain = 0U;
|
||||
u8_t fs = LIS2DW12_FS_TO_REG(range);
|
||||
uint8_t shift_gain = 0U;
|
||||
uint8_t fs = LIS2DW12_FS_TO_REG(range);
|
||||
|
||||
err = lis2dw12_full_scale_set(lis2dw12->ctx, fs);
|
||||
|
||||
|
@ -60,10 +60,10 @@ static int lis2dw12_set_range(struct device *dev, u16_t range)
|
|||
* @dev: Pointer to instance of struct device (I2C or SPI)
|
||||
* @odr: Output data rate
|
||||
*/
|
||||
static int lis2dw12_set_odr(struct device *dev, u16_t odr)
|
||||
static int lis2dw12_set_odr(struct device *dev, uint16_t odr)
|
||||
{
|
||||
struct lis2dw12_data *lis2dw12 = dev->driver_data;
|
||||
u8_t val;
|
||||
uint8_t val;
|
||||
|
||||
/* check if power off */
|
||||
if (odr == 0U) {
|
||||
|
@ -83,11 +83,11 @@ static int lis2dw12_set_odr(struct device *dev, u16_t odr)
|
|||
static inline void lis2dw12_convert(struct sensor_value *val, int raw_val,
|
||||
float gain)
|
||||
{
|
||||
s64_t dval;
|
||||
int64_t dval;
|
||||
|
||||
/* Gain is in ug/LSB */
|
||||
/* Convert to m/s^2 */
|
||||
dval = ((s64_t)raw_val * gain * SENSOR_G) / 1000000LL;
|
||||
dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL;
|
||||
val->val1 = dval / 1000000LL;
|
||||
val->val2 = dval % 1000000LL;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ static inline void lis2dw12_channel_get_acc(struct device *dev,
|
|||
struct sensor_value *val)
|
||||
{
|
||||
int i;
|
||||
u8_t ofs_start, ofs_stop;
|
||||
uint8_t ofs_start, ofs_stop;
|
||||
struct lis2dw12_data *lis2dw12 = dev->driver_data;
|
||||
struct sensor_value *pval = val;
|
||||
|
||||
|
@ -179,7 +179,7 @@ static int lis2dw12_sample_fetch(struct device *dev, enum sensor_channel chan)
|
|||
{
|
||||
struct lis2dw12_data *lis2dw12 = dev->driver_data;
|
||||
const struct lis2dw12_device_config *cfg = dev->config_info;
|
||||
u8_t shift;
|
||||
uint8_t shift;
|
||||
union axis3bit16_t buf;
|
||||
|
||||
/* fetch raw data sample */
|
||||
|
@ -236,7 +236,7 @@ static int lis2dw12_init_interface(struct device *dev)
|
|||
static int lis2dw12_set_power_mode(struct lis2dw12_data *lis2dw12,
|
||||
lis2dw12_mode_t pm)
|
||||
{
|
||||
u8_t regval = LIS2DW12_CONT_LOW_PWR_12bit;
|
||||
uint8_t regval = LIS2DW12_CONT_LOW_PWR_12bit;
|
||||
|
||||
switch (pm) {
|
||||
case LIS2DW12_CONT_LOW_PWR_2:
|
||||
|
@ -257,7 +257,7 @@ static int lis2dw12_init(struct device *dev)
|
|||
{
|
||||
struct lis2dw12_data *lis2dw12 = dev->driver_data;
|
||||
const struct lis2dw12_device_config *cfg = dev->config_info;
|
||||
u8_t wai;
|
||||
uint8_t wai;
|
||||
|
||||
if (lis2dw12_init_interface(dev)) {
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue