2017-11-24 13:29:36 +02:00
|
|
|
#ifndef MAIN_H
|
|
|
|
#define MAIN_H
|
|
|
|
|
2017-11-28 15:25:12 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-01-20 20:43:41 +02:00
|
|
|
#define MAX_PAYLOAD_SIZE 32
|
|
|
|
|
|
|
|
enum return_codes {
|
|
|
|
R_OK,
|
|
|
|
R_PACKAGE_SIZE,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
double temp;
|
|
|
|
/* uint8_t temp; */
|
|
|
|
/* uint8_t distance; */
|
|
|
|
uint16_t distance;
|
|
|
|
} data_packet_t;
|
|
|
|
|
2018-01-20 18:47:50 +02:00
|
|
|
uint8_t tx_address[5] = {0xE7, 0xE7, 0xE7, 0xE7, 0xE7};
|
|
|
|
uint8_t rx_address[5] = {0xD7, 0xD7, 0xD7, 0xD7, 0xD7};
|
|
|
|
|
2018-01-20 20:43:41 +02:00
|
|
|
|
|
|
|
void convert_data_to_raw(data_packet_t *in, uint8_t *out);
|
2017-11-24 13:29:36 +02:00
|
|
|
|
|
|
|
#endif
|