29 lines
529 B
C
29 lines
529 B
C
#pragma once
|
|
#ifndef __UART_DRV_H__
|
|
#define __UART_DRV_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include "app_config.h"
|
|
#include "sdk_errors.h"
|
|
|
|
#if (DEF_UARTE_ENABLED)
|
|
void uart_init(void);
|
|
int uart_send(void *p_data, uint32_t size);
|
|
int uart_recv(void *p_data, uint32_t max_size);
|
|
ret_code_t uart_set_baud(uint32_t baudrate);
|
|
#else
|
|
#define uart_init()
|
|
#define uart_send(...) ;
|
|
#define uart_recv(...) ;
|
|
#endif /* ! DEF_UARTE_ENABLED */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* ! __UART_DRV_H__ */
|