Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of d7a_1x by
Diff: src/d7a_com.cpp
- Revision:
- 49:81d5bddb02f0
- Parent:
- 47:19f22e1a448a
- Child:
- 56:da34fc11e760
--- a/src/d7a_com.cpp Fri Sep 02 10:07:12 2016 +0000
+++ b/src/d7a_com.cpp Fri Sep 02 16:08:09 2016 +0000
@@ -1,6 +1,7 @@
#include "mbed.h"
#include "rtos.h"
#include "dbg.h"
+#include "d7a.h"
#include "d7a_com.h"
#include "d7a_alp.h"
#include "d7a_common.h"
@@ -146,7 +147,7 @@
// RX-host <- TX-modem
// RTS-host -> CTS-modem
// CTS-host <- RTS-modem
-void d7a_com_open( const d7a_com_config_t* config )
+d7a_errors_t d7a_com_open( const d7a_com_config_t* config )
{
FPRINT("\r\n");
@@ -183,10 +184,12 @@
g_com_ctx.tx_thread = new Thread(d7a_com_tx_thread, NULL, osPriorityHigh, DEFAULT_STACK_SIZE);
g_com_ctx.rx_thread = new Thread(d7a_com_rx_thread, NULL, osPriorityHigh, DEFAULT_STACK_SIZE);
+
+ return D7A_ERR_NONE;
}
// Destructor
-void d7a_com_close()
+d7a_errors_t d7a_com_close()
{
FPRINT("\r\n");
g_com_ctx.rx_thread->terminate();
@@ -197,6 +200,8 @@
delete g_com_ctx.rts;
delete g_com_ctx.cts;
FREE(g_com_ctx.rx_buffer);
+
+ return D7A_ERR_NONE;
}
void d7a_com_start_rx(void)
