aboutsummaryrefslogtreecommitdiff
path: root/extmod/nimble/hal
diff options
context:
space:
mode:
authorDamien George2019-07-04 18:03:26 +1000
committerJim Mussared2019-10-01 09:51:02 +1000
commit07f6644a38e2a4d5aa96d3f007ffd21fcedc3955 (patch)
tree2e32903d6af39bc5e084b24f3f05d3f638305f72 /extmod/nimble/hal
parent21507a6f621a0e300a7a2942a6bde6be3d62c20b (diff)
extmod/nimble: Add nimble bindings.
Diffstat (limited to 'extmod/nimble/hal')
-rw-r--r--extmod/nimble/hal/hal_gpio.h1
-rw-r--r--extmod/nimble/hal/hal_uart.h18
2 files changed, 19 insertions, 0 deletions
diff --git a/extmod/nimble/hal/hal_gpio.h b/extmod/nimble/hal/hal_gpio.h
new file mode 100644
index 000000000..8b1a39374
--- /dev/null
+++ b/extmod/nimble/hal/hal_gpio.h
@@ -0,0 +1 @@
+// empty
diff --git a/extmod/nimble/hal/hal_uart.h b/extmod/nimble/hal/hal_uart.h
new file mode 100644
index 000000000..294dfb50d
--- /dev/null
+++ b/extmod/nimble/hal/hal_uart.h
@@ -0,0 +1,18 @@
+#ifndef MICROPY_INCLUDED_EXTMOD_NIMBLE_HAL_HAL_UART_H
+#define MICROPY_INCLUDED_EXTMOD_NIMBLE_HAL_HAL_UART_H
+
+#include <stdint.h>
+
+#define SYSINIT_PANIC_ASSERT_MSG(cond, msg)
+
+#define HAL_UART_PARITY_NONE (0)
+
+typedef int (*hal_uart_tx_cb_t)(void *arg);
+typedef int (*hal_uart_rx_cb_t)(void *arg, uint8_t data);
+
+int hal_uart_init_cbs(uint32_t port, hal_uart_tx_cb_t tx_cb, void *tx_arg, hal_uart_rx_cb_t rx_cb, void *rx_arg);
+int hal_uart_config(uint32_t port, uint32_t baud, uint32_t bits, uint32_t stop, uint32_t parity, uint32_t flow);
+void hal_uart_start_tx(uint32_t port);
+int hal_uart_close(uint32_t port);
+
+#endif // MICROPY_INCLUDED_EXTMOD_NIMBLE_HAL_HAL_UART_H