Added some fixes for c++ compatebility

This commit is contained in:
Sebastian 2017-12-27 21:34:20 +01:00
parent ff507c6ef7
commit dfb4721183
2 changed files with 12 additions and 3 deletions

View File

@ -99,7 +99,7 @@ void *eventloop(void *arg) {
// Send a byte, if there is one
if(uart_tx_state == TX_HAS_BYTE) {
write(serial_fd, &uart_tx_byte, 1);
printf("Send %x\n", uart_tx_byte);
//printf("Send %x\n", uart_tx_byte);
uart_tx_state = TX_COMPLETE;
}
@ -107,7 +107,7 @@ void *eventloop(void *arg) {
// Or read a byte send by somebody else.
res = read(serial_fd, &uart_rx_byte, 1);
if(res == 1) {
printf("Read %x\n", uart_rx_byte);
//printf("Read %x\n", uart_rx_byte);
// Lock mutexes and call rx handler
pthread_mutex_lock(&state_mutex);
pthread_mutex_lock(&rx_buffer_mutex);

View File

@ -6,6 +6,9 @@
#define LIBSSS7_PAYLOAD_SIZE 16
// See libsss7.c for more detailed descriptions
#ifdef __cplusplus
extern "C" {
#endif
// Setup function
int libsss7_start(char *serialport);
@ -26,6 +29,12 @@ int libsss7_has_received(void);
void libsss7_get_received(uint8_t *msg);
// Teardown function
void libsss7_stop();
void libsss7_stop(void);
#ifdef __cplusplus
}
#endif
#endif