mirror of
https://github.com/yoboujon/dumber.git
synced 2025-06-09 14:20:50 +02:00
29 lines
740 B
C
29 lines
740 B
C
#ifndef COM_H
|
|
#define COM_H
|
|
|
|
#include "stm32f1xx_hal.h"
|
|
|
|
/*
|
|
* TRAME 802.15.4 <0x7E> <data lenght(2bytes)> <Frame Data> <checksum>
|
|
*/
|
|
|
|
typedef struct{
|
|
int address;
|
|
int apiCmd; // Emision
|
|
int rssi; // Reception
|
|
char data[100];
|
|
int data_length;
|
|
int options;
|
|
int status; // Emission
|
|
} ST_XBEE_FRAME;
|
|
|
|
|
|
|
|
void INIT_RECEIVE(void);
|
|
short get_whole_trame(char* BufferRx, uint8_t *sizeTrame);
|
|
void dmaRestart(void);
|
|
int xbee_escape_chars_transmit(char* buffer_out, char* buffer_in, int length_in);
|
|
int xbee_escape_chars_receipt(char* buffer_in, char* buffer_out, int length_in);
|
|
int xbee_unpack_frame(char * xbee_frame_buffer,ST_XBEE_FRAME *frame);
|
|
int xbee_send_data(int addr_destination, char *str);
|
|
#endif
|