커맨드 구조 분리
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/*******************************************************************************
|
||||
* @file cmd_common.h
|
||||
* @brief BLE command common helpers
|
||||
******************************************************************************/
|
||||
#ifndef CMD_COMMON_H__
|
||||
#define CMD_COMMON_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "imu_i2c.h"
|
||||
#include "piezo_measure.h"
|
||||
|
||||
void cmd_reboot_after_response(void);
|
||||
uint16_t cmd_crc16_compute(const uint8_t *p_data, uint32_t size);
|
||||
bool cmd_get_data_u16_be(const uint8_t *data, uint8_t data_len, uint8_t word_index, uint16_t *out);
|
||||
void cmd_copy_fixed_ascii(char *dst, size_t dst_len, const char *src, size_t src_len);
|
||||
char cmd_ascii_to_lower(char ch);
|
||||
uint8_t cmd_next_echo_session(void);
|
||||
|
||||
int cmd_send_response_u16(const char *tag, uint16_t value);
|
||||
int cmd_send_response_ascii(const char *tag, const char *value, uint8_t value_len);
|
||||
int cmd_send_response_identity(void);
|
||||
int cmd_send_response_tag_echo(const char *tag, const char *echo_tag);
|
||||
int cmd_send_response_imu(const int16_t accel[3], const int16_t gyro[3]);
|
||||
void cmd_send_response_echo(uint8_t session, uint8_t channel, const uint16_t *samples, uint16_t num_samples);
|
||||
void cmd_send_response_bundle(uint16_t batt_mv, const int16_t accel[3], const int16_t gyro[3], int16_t temp_cdeg);
|
||||
void cmd_send_response_rim(const uint8_t *sample_bytes, uint16_t sample_count);
|
||||
void cmd_send_response_piezo_config(const char *tag, uint16_t freq, uint16_t cycles, uint16_t avg, uint16_t delay_us, uint16_t samples);
|
||||
|
||||
#endif /* CMD_COMMON_H__ */
|
||||
Reference in New Issue
Block a user