2016-11-26 16:49:03 +01:00
|
|
|
#ifndef _LIBSSS7_H_
|
|
|
|
#define _LIBSSS7_H_
|
|
|
|
|
2016-12-03 22:58:55 +01:00
|
|
|
#include<stdint.h>
|
|
|
|
|
|
|
|
#define LIBSSS7_PAYLOAD_SIZE 16
|
2016-11-26 16:49:03 +01:00
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// See libsss7.c for more detailed descriptions
|
|
|
|
|
|
|
|
// Setup function
|
2016-11-26 16:49:03 +01:00
|
|
|
int libsss7_start(char *serialport);
|
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Checks if a frame can be sent
|
2016-11-26 16:49:03 +01:00
|
|
|
int libsss7_can_send(void);
|
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Send a frame with the payload msg
|
2016-12-03 22:58:55 +01:00
|
|
|
void libsss7_send(uint8_t msg[LIBSSS7_PAYLOAD_SIZE]);
|
2016-11-26 16:49:03 +01:00
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Check if the last transmission failed
|
2016-11-26 16:49:03 +01:00
|
|
|
int libsss7_send_failed(void);
|
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Check if there are received payloads in the rx buffer
|
2016-11-26 16:49:03 +01:00
|
|
|
int libsss7_has_received(void);
|
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Get a payload from the rx buffer
|
2016-11-30 22:47:26 +01:00
|
|
|
void libsss7_get_received(uint8_t *msg);
|
2016-11-26 16:49:03 +01:00
|
|
|
|
2016-12-03 19:17:54 +01:00
|
|
|
// Teardown function
|
2016-11-26 16:49:03 +01:00
|
|
|
void libsss7_stop();
|
|
|
|
|
|
|
|
#endif
|