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
|
@ -100,8 +100,8 @@ struct shell_cmd_entry {
|
|||
struct shell;
|
||||
|
||||
struct shell_static_args {
|
||||
u8_t mandatory; /*!< Number of mandatory arguments. */
|
||||
u8_t optional; /*!< Number of optional arguments. */
|
||||
uint8_t mandatory; /*!< Number of mandatory arguments. */
|
||||
uint8_t optional; /*!< Number of optional arguments. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -514,18 +514,18 @@ struct shell_stats {
|
|||
* @internal @brief Flags for internal shell usage.
|
||||
*/
|
||||
struct shell_flags {
|
||||
u32_t insert_mode :1; /*!< Controls insert mode for text introduction.*/
|
||||
u32_t use_colors :1; /*!< Controls colored syntax.*/
|
||||
u32_t echo :1; /*!< Controls shell echo.*/
|
||||
u32_t processing :1; /*!< Shell is executing process function.*/
|
||||
u32_t tx_rdy :1;
|
||||
u32_t mode_delete :1; /*!< Operation mode of backspace key */
|
||||
u32_t history_exit:1; /*!< Request to exit history mode */
|
||||
u32_t cmd_ctx :1; /*!< Shell is executing command */
|
||||
u32_t last_nl :8; /*!< Last received new line character */
|
||||
uint32_t insert_mode :1; /*!< Controls insert mode for text introduction.*/
|
||||
uint32_t use_colors :1; /*!< Controls colored syntax.*/
|
||||
uint32_t echo :1; /*!< Controls shell echo.*/
|
||||
uint32_t processing :1; /*!< Shell is executing process function.*/
|
||||
uint32_t tx_rdy :1;
|
||||
uint32_t mode_delete :1; /*!< Operation mode of backspace key */
|
||||
uint32_t history_exit:1; /*!< Request to exit history mode */
|
||||
uint32_t cmd_ctx :1; /*!< Shell is executing command */
|
||||
uint32_t last_nl :8; /*!< Last received new line character */
|
||||
};
|
||||
|
||||
BUILD_ASSERT((sizeof(struct shell_flags) == sizeof(u32_t)),
|
||||
BUILD_ASSERT((sizeof(struct shell_flags) == sizeof(uint32_t)),
|
||||
"Structure must fit in 4 bytes");
|
||||
|
||||
|
||||
|
@ -533,7 +533,7 @@ BUILD_ASSERT((sizeof(struct shell_flags) == sizeof(u32_t)),
|
|||
* @internal @brief Union for internal shell usage.
|
||||
*/
|
||||
union shell_internal {
|
||||
u32_t value;
|
||||
uint32_t value;
|
||||
struct shell_flags flags;
|
||||
};
|
||||
|
||||
|
@ -563,10 +563,10 @@ struct shell_ctx {
|
|||
/*!< VT100 color and cursor position, terminal width.*/
|
||||
struct shell_vt100_ctx vt100_ctx;
|
||||
|
||||
u16_t cmd_buff_len; /*!< Command length.*/
|
||||
u16_t cmd_buff_pos; /*!< Command buffer cursor position.*/
|
||||
uint16_t cmd_buff_len; /*!< Command length.*/
|
||||
uint16_t cmd_buff_pos; /*!< Command buffer cursor position.*/
|
||||
|
||||
u16_t cmd_tmp_buff_len; /*!< Command length in tmp buffer.*/
|
||||
uint16_t cmd_tmp_buff_len; /*!< Command length in tmp buffer.*/
|
||||
|
||||
/*!< Command input buffer.*/
|
||||
char cmd_buff[CONFIG_SHELL_CMD_BUFF_SIZE];
|
||||
|
@ -641,7 +641,7 @@ extern void shell_print_stream(const void *user_ctx, const char *data,
|
|||
_log_queue_size, _log_timeout, _shell_flag) \
|
||||
static const struct shell _name; \
|
||||
static struct shell_ctx UTIL_CAT(_name, _ctx); \
|
||||
static u8_t _name##_out_buffer[CONFIG_SHELL_PRINTF_BUFF_SIZE]; \
|
||||
static uint8_t _name##_out_buffer[CONFIG_SHELL_PRINTF_BUFF_SIZE]; \
|
||||
SHELL_LOG_BACKEND_DEFINE(_name, _name##_out_buffer, \
|
||||
CONFIG_SHELL_PRINTF_BUFF_SIZE, \
|
||||
_log_queue_size, _log_timeout); \
|
||||
|
@ -682,7 +682,7 @@ extern void shell_print_stream(const void *user_ctx, const char *data,
|
|||
* @return Standard error code.
|
||||
*/
|
||||
int shell_init(const struct shell *shell, const void *transport_config,
|
||||
bool use_colors, bool log_backend, u32_t init_log_level);
|
||||
bool use_colors, bool log_backend, uint32_t init_log_level);
|
||||
|
||||
/**
|
||||
* @brief Uninitializes the transport layer and the internal shell state.
|
||||
|
@ -772,7 +772,7 @@ void shell_vfprintf(const struct shell *shell, enum shell_vt100_color color,
|
|||
* @param[in] data Pointer to data.
|
||||
* @param[in] len Length of data.
|
||||
*/
|
||||
void shell_hexdump(const struct shell *shell, const u8_t *data, size_t len);
|
||||
void shell_hexdump(const struct shell *shell, const uint8_t *data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Print info message to the shell.
|
||||
|
|
|
@ -27,7 +27,7 @@ struct shell_fprintf_control_block {
|
|||
* @brief fprintf context
|
||||
*/
|
||||
struct shell_fprintf {
|
||||
u8_t *buffer;
|
||||
uint8_t *buffer;
|
||||
size_t buffer_size;
|
||||
shell_fprintf_fwrite fwrite;
|
||||
const void *user_ctx;
|
||||
|
|
|
@ -31,7 +31,7 @@ struct shell_history {
|
|||
* @param _size Memory dedicated for shell history.
|
||||
*/
|
||||
#define SHELL_HISTORY_DEFINE(_name, _size) \
|
||||
static u8_t __noinit __aligned(sizeof(void *)) \
|
||||
static uint8_t __noinit __aligned(sizeof(void *)) \
|
||||
_name##_ring_buf_data[_size]; \
|
||||
static struct ring_buf _name##_ring_buf = \
|
||||
{ \
|
||||
|
@ -80,7 +80,7 @@ void shell_history_mode_exit(struct shell_history *history);
|
|||
* @return True if remains in history mode.
|
||||
*/
|
||||
bool shell_history_get(struct shell_history *history, bool up,
|
||||
u8_t *dst, u16_t *len);
|
||||
uint8_t *dst, uint16_t *len);
|
||||
|
||||
/**
|
||||
* @brief Put line into shell command history.
|
||||
|
@ -92,7 +92,7 @@ bool shell_history_get(struct shell_history *history, bool up,
|
|||
* @param len Data length.
|
||||
*
|
||||
*/
|
||||
void shell_history_put(struct shell_history *history, u8_t *line, size_t len);
|
||||
void shell_history_put(struct shell_history *history, uint8_t *line, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Get state of shell history.
|
||||
|
|
|
@ -37,17 +37,17 @@ struct shell_log_backend {
|
|||
struct k_msgq *msgq;
|
||||
const struct log_output *log_output;
|
||||
struct shell_log_backend_control_block *control_block;
|
||||
u32_t timeout;
|
||||
uint32_t timeout;
|
||||
};
|
||||
|
||||
/** @brief Shell log backend message structure. */
|
||||
struct shell_log_backend_msg {
|
||||
struct log_msg *msg;
|
||||
u32_t timestamp;
|
||||
uint32_t timestamp;
|
||||
};
|
||||
|
||||
/** @brief Prototype of function outputing processed data. */
|
||||
int shell_log_backend_output_func(u8_t *data, size_t length, void *ctx);
|
||||
int shell_log_backend_output_func(uint8_t *data, size_t length, void *ctx);
|
||||
|
||||
/** @def SHELL_LOG_BACKEND_DEFINE
|
||||
* @brief Macro for creating instance of shell log backend.
|
||||
|
@ -93,7 +93,7 @@ int shell_log_backend_output_func(u8_t *data, size_t length, void *ctx);
|
|||
* @param init_log_level Initial log level set to all logging sources.
|
||||
*/
|
||||
void shell_log_backend_enable(const struct shell_log_backend *backend,
|
||||
void *ctx, u32_t init_log_level);
|
||||
void *ctx, uint32_t init_log_level);
|
||||
|
||||
/** @brief Disable shell log backend.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,7 @@ struct shell_telnet_line_buf {
|
|||
char buf[CONFIG_SHELL_TELNET_LINE_BUF_SIZE];
|
||||
|
||||
/** Current line length. */
|
||||
u16_t len;
|
||||
uint16_t len;
|
||||
};
|
||||
|
||||
/** TELNET-based shell transport. */
|
||||
|
|
|
@ -31,19 +31,19 @@ struct shell_vt100_colors {
|
|||
};
|
||||
|
||||
struct shell_multiline_cons {
|
||||
u16_t cur_x; /* horizontal cursor position in edited command line.*/
|
||||
u16_t cur_x_end; /* horizontal cursor position at the end of command.*/
|
||||
u16_t cur_y; /* vertical cursor position in edited command.*/
|
||||
u16_t cur_y_end; /* vertical cursor position at the end of command.*/
|
||||
u16_t terminal_hei; /* terminal screen height.*/
|
||||
u16_t terminal_wid; /* terminal screen width.*/
|
||||
u8_t name_len; /*!<console name length.*/
|
||||
uint16_t cur_x; /* horizontal cursor position in edited command line.*/
|
||||
uint16_t cur_x_end; /* horizontal cursor position at the end of command.*/
|
||||
uint16_t cur_y; /* vertical cursor position in edited command.*/
|
||||
uint16_t cur_y_end; /* vertical cursor position at the end of command.*/
|
||||
uint16_t terminal_hei; /* terminal screen height.*/
|
||||
uint16_t terminal_wid; /* terminal screen width.*/
|
||||
uint8_t name_len; /*!<console name length.*/
|
||||
};
|
||||
|
||||
struct shell_vt100_ctx {
|
||||
struct shell_multiline_cons cons;
|
||||
struct shell_vt100_colors col;
|
||||
u16_t printed_cmd; /* printed commands counter */
|
||||
uint16_t printed_cmd; /* printed commands counter */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -37,7 +37,7 @@ struct shell_uart_ctrl_blk {
|
|||
RING_BUF_DECLARE(_name##_tx_ringbuf, _size)
|
||||
|
||||
#define UART_SHELL_TX_BUF_DECLARE(_name) \
|
||||
u8_t _name##_txbuf[SHELL_UART_TX_BUF_SIZE]
|
||||
uint8_t _name##_txbuf[SHELL_UART_TX_BUF_SIZE]
|
||||
|
||||
#define UART_SHELL_RX_TIMER_DECLARE(_name) /* Empty */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue