BM utility functions.
Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
#include "bm_utils.h"
Functions | |
uint8_t | calc_chksum_8bit (uint8_t *data, uint16_t length) |
void | format_hex (uint8_t *str, uint16_t val) |
void | format_hex_24bit (uint8_t *str, uint32_t val) |
void | format_hex_bdaddrs (uint8_t *str, uint64_t val) |
void | format_hex_bdaddrs2 (uint8_t *str, uint8_t *val) |
void | format_hex_byte (uint8_t *str, uint8_t val) |
void | format_hex_byte2 (uint8_t *str, uint8_t val) |
void | format_hex_long (uint8_t *str, uint64_t val) |
uint8_t | get_hex (uint8_t *str, uint16_t *val) |
uint8_t | get_hex_24bit (uint8_t *str, uint32_t *val) |
uint8_t | get_hex_bdaddrs (uint8_t *str, uint64_t *val) |
uint8_t | get_hex_byte (uint8_t *str, uint8_t *val) |
uint8_t | get_hex_dword (uint8_t *str, uint32_t *val) |
uint8_t | get_hex_long (uint8_t *str, uint64_t *val) |
void | memcpy_ascii_order (uint8_t *a, uint8_t *b, int len) |
void | memcpy_ascii_reorder (uint8_t *a, uint8_t *b, int len) |
uint8_t * | memcpy_inplace_reorder (uint8_t *data, uint16_t len) |
uint8_t * | memcpy_nibble_inplace_reorder (uint8_t *data, uint16_t len) |
void | memcpy_nibble_reorder (uint8_t *a, uint8_t *b, int len) |
void | memcpy_reorder (uint8_t *a, uint8_t *b, int len) |
uint8_t | set_to_upper (uint8_t lower) |
uint8_t calc_chksum_8bit | ( | uint8_t * | data, |
uint16_t | length | ||
) |
References data, i, and length.
Referenced by BM_APPLICATION_CmdPkt(), and BM_APPLICATION_Response().
void format_hex | ( | uint8_t * | str, |
uint16_t | val | ||
) |
void format_hex_24bit | ( | uint8_t * | str, |
uint32_t | val | ||
) |
void format_hex_bdaddrs | ( | uint8_t * | str, |
uint64_t | val | ||
) |
void format_hex_bdaddrs2 | ( | uint8_t * | str, |
uint8_t * | val | ||
) |
void format_hex_byte | ( | uint8_t * | str, |
uint8_t | val | ||
) |
Referenced by memcpy_ascii_order(), and memcpy_ascii_reorder().
void format_hex_byte2 | ( | uint8_t * | str, |
uint8_t | val | ||
) |
void format_hex_long | ( | uint8_t * | str, |
uint64_t | val | ||
) |
uint8_t get_hex | ( | uint8_t * | str, |
uint16_t * | val | ||
) |
References get_hex_byte().
uint8_t get_hex_24bit | ( | uint8_t * | str, |
uint32_t * | val | ||
) |
References get_hex_byte().
uint8_t get_hex_bdaddrs | ( | uint8_t * | str, |
uint64_t * | val | ||
) |
References get_hex_byte().
uint8_t get_hex_byte | ( | uint8_t * | str, |
uint8_t * | val | ||
) |
References set_to_upper().
Referenced by get_hex(), get_hex_24bit(), get_hex_bdaddrs(), get_hex_dword(), and get_hex_long().
uint8_t get_hex_dword | ( | uint8_t * | str, |
uint32_t * | val | ||
) |
References get_hex_byte().
uint8_t get_hex_long | ( | uint8_t * | str, |
uint64_t * | val | ||
) |
References get_hex_byte().
void memcpy_ascii_order | ( | uint8_t * | a, |
uint8_t * | b, | ||
int | len | ||
) |
References format_hex_byte(), and i.
void memcpy_ascii_reorder | ( | uint8_t * | a, |
uint8_t * | b, | ||
int | len | ||
) |
References format_hex_byte(), and i.
uint8_t* memcpy_inplace_reorder | ( | uint8_t * | data, |
uint16_t | len | ||
) |
References data.
Referenced by acc_gyro_sensor_service_init(), acce_sensor_data_send(), app_char_disc_resp_cb(), app_char_value_received_cb(), ble_gatt_service_read(), BM_APPLICATION_ConnCompleteEventParser(), BM_APPLICATION_ConnParamUpdateEventParser(), BM_APPLICATION_LeEndTestResultEventParser(), BM_APPLICATION_WriteCharValueEventParser(), and gyro_sensor_data_send().
uint8_t* memcpy_nibble_inplace_reorder | ( | uint8_t * | data, |
uint16_t | len | ||
) |
References data.
void memcpy_nibble_reorder | ( | uint8_t * | a, |
uint8_t * | b, | ||
int | len | ||
) |
References i.
void memcpy_reorder | ( | uint8_t * | a, |
uint8_t * | b, | ||
int | len | ||
) |
uint8_t set_to_upper | ( | uint8_t | lower | ) |
Referenced by get_hex_byte().