UART_DEMO.h 594 Bytes
Newer Older
李俭双's avatar
李俭双 committed
1 2 3 4 5 6 7 8
#ifndef __UART_DEMO_H__
#define __UART_DEMO_H__
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "uart.h"
#include "gpio.h"
#include "isr.h"
9
#include "Application.h"
李俭双's avatar
李俭双 committed
10
#define UART_MAX_RECV_LEN      256
李俭双's avatar
李俭双 committed
11

李俭双's avatar
李俭双 committed
12 13 14
extern unsigned char UART0_RX_BUF[UART_MAX_RECV_LEN];
extern unsigned short UART0_RX_STA ;
extern unsigned char UART0_TX_BUF[UART_MAX_RECV_LEN];
李俭双's avatar
李俭双 committed
15 16 17 18 19 20 21 22

int8_t Uart0_Init(uint32_t bound);

void Uart0_Send(uint8_t ch);
char Uart0_Receive(void);

void Uart0_IntSend(uint8_t *tx_buf, uint16_t tx_num);
void uart0_interrupt_send(void *msg);
李俭双's avatar
李俭双 committed
23
void uart0_interrupt_receive(void);
李俭双's avatar
李俭双 committed
24
#endif