2018-07-30 15:54:44 +08:00
|
|
|
#ifndef __USART_H
|
|
|
|
#define __USART_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "proxmark3.h"
|
2019-04-14 17:08:44 +08:00
|
|
|
|
|
|
|
#define AT91_BAUD_RATE 115200
|
2018-07-30 15:54:44 +08:00
|
|
|
|
|
|
|
void usart_init(void);
|
|
|
|
void usart_close(void);
|
|
|
|
|
2019-04-03 04:06:10 +08:00
|
|
|
int16_t usart_readbuffer(uint8_t *data);
|
2018-09-07 03:43:20 +08:00
|
|
|
int16_t usart_writebuffer(uint8_t *data, size_t len);
|
2019-04-02 07:06:00 +08:00
|
|
|
bool usart_dataavailable(void);
|
2019-04-03 04:06:10 +08:00
|
|
|
int16_t usart_readcommand(uint8_t *data);
|
2019-04-14 17:43:05 +08:00
|
|
|
void usart_readcheck(uint8_t *data, size_t len);
|
2019-04-14 17:08:44 +08:00
|
|
|
|
2019-04-03 04:06:10 +08:00
|
|
|
bool usart_commandavailable(void);
|
2018-07-30 15:54:44 +08:00
|
|
|
#endif
|