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
|
@ -66,11 +66,11 @@ LOG_MODULE_REGISTER(ht16k33);
|
|||
|
||||
struct ht16k33_cfg {
|
||||
char *i2c_dev_name;
|
||||
u16_t i2c_addr;
|
||||
uint16_t i2c_addr;
|
||||
bool irq_enabled;
|
||||
#ifdef CONFIG_HT16K33_KEYSCAN
|
||||
char *irq_dev_name;
|
||||
u32_t irq_pin;
|
||||
uint32_t irq_pin;
|
||||
int irq_flags;
|
||||
#endif /* CONFIG_HT16K33_KEYSCAN */
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ struct ht16k33_data {
|
|||
struct device *i2c;
|
||||
struct led_data dev_data;
|
||||
/* Shadow buffer for the display data RAM */
|
||||
u8_t buffer[HT16K33_DISP_DATA_SIZE];
|
||||
uint8_t buffer[HT16K33_DISP_DATA_SIZE];
|
||||
#ifdef CONFIG_HT16K33_KEYSCAN
|
||||
struct k_mutex lock;
|
||||
struct device *children[HT16K33_KEYSCAN_ROWS];
|
||||
|
@ -87,15 +87,15 @@ struct ht16k33_data {
|
|||
struct k_thread irq_thread;
|
||||
struct k_sem irq_sem;
|
||||
struct k_timer timer;
|
||||
u16_t key_state[HT16K33_KEYSCAN_ROWS];
|
||||
uint16_t key_state[HT16K33_KEYSCAN_ROWS];
|
||||
|
||||
K_THREAD_STACK_MEMBER(irq_thread_stack,
|
||||
CONFIG_HT16K33_KEYSCAN_IRQ_THREAD_STACK_SIZE);
|
||||
#endif /* CONFIG_HT16K33_KEYSCAN */
|
||||
};
|
||||
|
||||
static int ht16k33_led_blink(struct device *dev, u32_t led,
|
||||
u32_t delay_on, u32_t delay_off)
|
||||
static int ht16k33_led_blink(struct device *dev, uint32_t led,
|
||||
uint32_t delay_on, uint32_t delay_off)
|
||||
{
|
||||
/* The HT16K33 blinks all LEDs at the same frequency */
|
||||
ARG_UNUSED(led);
|
||||
|
@ -103,8 +103,8 @@ static int ht16k33_led_blink(struct device *dev, u32_t led,
|
|||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
u32_t period;
|
||||
u8_t cmd;
|
||||
uint32_t period;
|
||||
uint8_t cmd;
|
||||
|
||||
period = delay_on + delay_off;
|
||||
if (period < dev_data->min_period || period > dev_data->max_period) {
|
||||
|
@ -130,16 +130,16 @@ static int ht16k33_led_blink(struct device *dev, u32_t led,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ht16k33_led_set_brightness(struct device *dev, u32_t led,
|
||||
u8_t value)
|
||||
static int ht16k33_led_set_brightness(struct device *dev, uint32_t led,
|
||||
uint8_t value)
|
||||
{
|
||||
ARG_UNUSED(led);
|
||||
|
||||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
u8_t dim;
|
||||
u8_t cmd;
|
||||
uint8_t dim;
|
||||
uint8_t cmd;
|
||||
|
||||
if (value < dev_data->min_brightness ||
|
||||
value > dev_data->max_brightness) {
|
||||
|
@ -157,13 +157,13 @@ static int ht16k33_led_set_brightness(struct device *dev, u32_t led,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ht16k33_led_set_state(struct device *dev, u32_t led, bool on)
|
||||
static int ht16k33_led_set_state(struct device *dev, uint32_t led, bool on)
|
||||
{
|
||||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
u8_t cmd[2];
|
||||
u8_t addr;
|
||||
u8_t bit;
|
||||
uint8_t cmd[2];
|
||||
uint8_t addr;
|
||||
uint8_t bit;
|
||||
|
||||
if (led >= HT16K33_DISP_SEGMENTS) {
|
||||
return -EINVAL;
|
||||
|
@ -193,23 +193,23 @@ static int ht16k33_led_set_state(struct device *dev, u32_t led, bool on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ht16k33_led_on(struct device *dev, u32_t led)
|
||||
static int ht16k33_led_on(struct device *dev, uint32_t led)
|
||||
{
|
||||
return ht16k33_led_set_state(dev, led, true);
|
||||
}
|
||||
|
||||
static int ht16k33_led_off(struct device *dev, u32_t led)
|
||||
static int ht16k33_led_off(struct device *dev, uint32_t led)
|
||||
{
|
||||
return ht16k33_led_set_state(dev, led, false);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HT16K33_KEYSCAN
|
||||
u32_t ht16k33_get_pending_int(struct device *dev)
|
||||
uint32_t ht16k33_get_pending_int(struct device *dev)
|
||||
{
|
||||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
u8_t cmd;
|
||||
u8_t flag;
|
||||
uint8_t cmd;
|
||||
uint8_t flag;
|
||||
int err;
|
||||
|
||||
cmd = HT16K33_CMD_INT_FLAG_ADDR;
|
||||
|
@ -227,10 +227,10 @@ static bool ht16k33_process_keyscan_data(struct device *dev)
|
|||
{
|
||||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
u8_t keys[HT16K33_KEYSCAN_DATA_SIZE];
|
||||
uint8_t keys[HT16K33_KEYSCAN_DATA_SIZE];
|
||||
bool pressed = false;
|
||||
u16_t row;
|
||||
u16_t new;
|
||||
uint16_t row;
|
||||
uint16_t new;
|
||||
int err;
|
||||
int i;
|
||||
|
||||
|
@ -278,7 +278,7 @@ static void ht16k33_irq_thread(struct device *dev)
|
|||
}
|
||||
|
||||
static void ht16k33_irq_callback(struct device *gpiob,
|
||||
struct gpio_callback *cb, u32_t pins)
|
||||
struct gpio_callback *cb, uint32_t pins)
|
||||
{
|
||||
struct ht16k33_data *data;
|
||||
|
||||
|
@ -299,7 +299,7 @@ static void ht16k33_timer_callback(struct k_timer *timer)
|
|||
|
||||
int ht16k33_register_keyscan_device(struct device *parent,
|
||||
struct device *child,
|
||||
u8_t keyscan_idx)
|
||||
uint8_t keyscan_idx)
|
||||
{
|
||||
struct ht16k33_data *data = parent->driver_data;
|
||||
|
||||
|
@ -324,7 +324,7 @@ static int ht16k33_init(struct device *dev)
|
|||
const struct ht16k33_cfg *config = dev->config_info;
|
||||
struct ht16k33_data *data = dev->driver_data;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
u8_t cmd[1 + HT16K33_DISP_DATA_SIZE]; /* 1 byte command + data */
|
||||
uint8_t cmd[1 + HT16K33_DISP_DATA_SIZE]; /* 1 byte command + data */
|
||||
int err;
|
||||
|
||||
data->i2c = device_get_binding(config->i2c_dev_name);
|
||||
|
@ -383,7 +383,7 @@ static int ht16k33_init(struct device *dev)
|
|||
/* Configure interrupt */
|
||||
if (config->irq_enabled) {
|
||||
struct device *irq_dev;
|
||||
u8_t keys[HT16K33_KEYSCAN_DATA_SIZE];
|
||||
uint8_t keys[HT16K33_KEYSCAN_DATA_SIZE];
|
||||
|
||||
irq_dev = device_get_binding(config->irq_dev_name);
|
||||
if (!irq_dev) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue