diff options
| author | Maofeng <[email protected]> | 2020-11-15 18:46:28 +0800 |
|---|---|---|
| committer | Maofeng <[email protected]> | 2020-11-15 18:46:28 +0800 |
| commit | ffd34fd369f06880c0f585e922f09adb3d4d2f8d (patch) | |
| tree | 582b99b773a9130e30c8a5a27faddf27a6acb0cc /bsp/nrf5x/libraries/drivers/drv_uarte.h | |
| parent | 065488e74652806a9f58055d5fbb644fda338ae5 (diff) | |
[bsp/nrf5x]support for uarte1
Diffstat (limited to 'bsp/nrf5x/libraries/drivers/drv_uarte.h')
| -rw-r--r-- | bsp/nrf5x/libraries/drivers/drv_uarte.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bsp/nrf5x/libraries/drivers/drv_uarte.h b/bsp/nrf5x/libraries/drivers/drv_uarte.h new file mode 100644 index 0000000000..f07ddafd79 --- /dev/null +++ b/bsp/nrf5x/libraries/drivers/drv_uarte.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2006-2020, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2020-04-28 xckhmf Modify for <nrfx> + * 2020-10-31 xckhmf Support for UART1 + * + */ +#ifndef __DRV_UART_H__ +#define __DRV_UART_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define RT_DEVICE_CTRL_CUSTOM 0x20 +#define RT_DEVICE_CTRL_PIN 0x21 +#define RT_DEVICE_POWERSAVE 0x22 +#define RT_DEVICE_WAKEUP 0x23 + +#define UART_CONFIG_BAUD_RATE_9600 1 +#define UART_CONFIG_BAUD_RATE_115200 2 + +void rt_hw_uart_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __DRV_UART_H__ */ |
