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
|
@ -27,7 +27,7 @@ static inline int lsm9ds0_gyro_power_ctrl(struct device *dev, int power,
|
|||
{
|
||||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config *config = dev->config_info;
|
||||
u8_t state = (power << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_PD) |
|
||||
uint8_t state = (power << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_PD) |
|
||||
(x_en << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_XEN) |
|
||||
(y_en << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_YEN) |
|
||||
(z_en << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_ZEN);
|
||||
|
@ -41,7 +41,7 @@ static inline int lsm9ds0_gyro_power_ctrl(struct device *dev, int power,
|
|||
state);
|
||||
}
|
||||
|
||||
static int lsm9ds0_gyro_set_fs_raw(struct device *dev, u8_t fs)
|
||||
static int lsm9ds0_gyro_set_fs_raw(struct device *dev, uint8_t fs)
|
||||
{
|
||||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config *config = dev->config_info;
|
||||
|
@ -63,7 +63,7 @@ static int lsm9ds0_gyro_set_fs_raw(struct device *dev, u8_t fs)
|
|||
#if defined(CONFIG_LSM9DS0_GYRO_FULLSCALE_RUNTIME)
|
||||
static const struct {
|
||||
int fs;
|
||||
u8_t reg_val;
|
||||
uint8_t reg_val;
|
||||
} lsm9ds0_gyro_fs_table[] = { {245, 0},
|
||||
{500, 1},
|
||||
{2000, 2} };
|
||||
|
@ -82,7 +82,7 @@ static int lsm9ds0_gyro_set_fs(struct device *dev, int fs)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline int lsm9ds0_gyro_set_odr_raw(struct device *dev, u8_t odr)
|
||||
static inline int lsm9ds0_gyro_set_odr_raw(struct device *dev, uint8_t odr)
|
||||
{
|
||||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config *config = dev->config_info;
|
||||
|
@ -96,7 +96,7 @@ static inline int lsm9ds0_gyro_set_odr_raw(struct device *dev, u8_t odr)
|
|||
#if defined(CONFIG_LSM9DS0_GYRO_SAMPLING_RATE_RUNTIME)
|
||||
static const struct {
|
||||
int freq;
|
||||
u8_t reg_val;
|
||||
uint8_t reg_val;
|
||||
} lsm9ds0_gyro_samp_freq_table[] = { {95, 0},
|
||||
{190, 1},
|
||||
{380, 2},
|
||||
|
@ -123,7 +123,7 @@ static int lsm9ds0_gyro_sample_fetch(struct device *dev,
|
|||
{
|
||||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config *config = dev->config_info;
|
||||
u8_t x_l, x_h, y_l, y_h, z_l, z_h;
|
||||
uint8_t x_l, x_h, y_l, y_h, z_l, z_h;
|
||||
|
||||
__ASSERT_NO_MSG(chan == SENSOR_CHAN_ALL ||
|
||||
chan == SENSOR_CHAN_GYRO_XYZ);
|
||||
|
@ -144,9 +144,9 @@ static int lsm9ds0_gyro_sample_fetch(struct device *dev,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
data->sample_x = (s16_t)((u16_t)(x_l) | ((u16_t)(x_h) << 8));
|
||||
data->sample_y = (s16_t)((u16_t)(y_l) | ((u16_t)(y_h) << 8));
|
||||
data->sample_z = (s16_t)((u16_t)(z_l) | ((u16_t)(z_h) << 8));
|
||||
data->sample_x = (int16_t)((uint16_t)(x_l) | ((uint16_t)(x_h) << 8));
|
||||
data->sample_y = (int16_t)((uint16_t)(y_l) | ((uint16_t)(y_h) << 8));
|
||||
data->sample_z = (int16_t)((uint16_t)(z_l) | ((uint16_t)(z_h) << 8));
|
||||
|
||||
#if defined(CONFIG_LSM9DS0_GYRO_FULLSCALE_RUNTIME)
|
||||
data->sample_fs = data->fs;
|
||||
|
@ -161,8 +161,8 @@ static inline void lsm9ds0_gyro_convert(struct sensor_value *val, int raw_val,
|
|||
double dval;
|
||||
|
||||
dval = (double)(raw_val) * numerator / 1000.0 * DEG2RAD;
|
||||
val->val1 = (s32_t)dval;
|
||||
val->val2 = ((s32_t)(dval * 1000000)) % 1000000;
|
||||
val->val1 = (int32_t)dval;
|
||||
val->val2 = ((int32_t)(dval * 1000000)) % 1000000;
|
||||
}
|
||||
|
||||
static inline int lsm9ds0_gyro_get_channel(enum sensor_channel chan,
|
||||
|
@ -263,7 +263,7 @@ static int lsm9ds0_gyro_init_chip(struct device *dev)
|
|||
{
|
||||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config *config = dev->config_info;
|
||||
u8_t chip_id;
|
||||
uint8_t chip_id;
|
||||
|
||||
if (lsm9ds0_gyro_power_ctrl(dev, 0, 0, 0, 0) < 0) {
|
||||
LOG_DBG("failed to power off device");
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
|
||||
struct lsm9ds0_gyro_config {
|
||||
char *i2c_master_dev_name;
|
||||
u16_t i2c_slave_addr;
|
||||
uint16_t i2c_slave_addr;
|
||||
|
||||
#if CONFIG_LSM9DS0_GYRO_TRIGGER_DRDY
|
||||
char *gpio_drdy_dev_name;
|
||||
|
@ -241,8 +241,8 @@ struct lsm9ds0_gyro_data {
|
|||
|
||||
int sample_x, sample_y, sample_z;
|
||||
#if defined(CONFIG_LSM9DS0_GYRO_FULLSCALE_RUNTIME)
|
||||
u8_t sample_fs;
|
||||
u8_t fs;
|
||||
uint8_t sample_fs;
|
||||
uint8_t fs;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ int lsm9ds0_gyro_trigger_set(struct device *dev,
|
|||
struct lsm9ds0_gyro_data *data = dev->driver_data;
|
||||
const struct lsm9ds0_gyro_config * const config =
|
||||
dev->config_info;
|
||||
u8_t state;
|
||||
uint8_t state;
|
||||
|
||||
if (trig->type == SENSOR_TRIG_DATA_READY) {
|
||||
setup_drdy(dev, false);
|
||||
|
@ -71,7 +71,7 @@ int lsm9ds0_gyro_trigger_set(struct device *dev,
|
|||
}
|
||||
|
||||
static void lsm9ds0_gyro_gpio_drdy_callback(struct device *dev,
|
||||
struct gpio_callback *cb, u32_t pins)
|
||||
struct gpio_callback *cb, uint32_t pins)
|
||||
{
|
||||
struct lsm9ds0_gyro_data *data =
|
||||
CONTAINER_OF(cb, struct lsm9ds0_gyro_data, gpio_cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue