first init
This commit is contained in:
38
has_project/has_driver/v851/uart.c
Normal file
38
has_project/has_driver/v851/uart.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "has_platform.h"
|
||||
#include <string.h>
|
||||
|
||||
int uart_open(int param)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int uart_close(int param)
|
||||
{
|
||||
printf("init uart %d\n", param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int uart_write(int param, void *buff, unsigned int len)
|
||||
{
|
||||
unsigned char *temp = buff;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int uart_read(int param, void *buff, unsigned int len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int uart_ioctl(int param, void *buff, unsigned int len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Device_stu_t uart_dev = {
|
||||
.open = uart_open,
|
||||
.close = uart_close,
|
||||
.write = uart_write,
|
||||
.read = uart_read,
|
||||
.drv_ctl = uart_ioctl,
|
||||
};
|
||||
HAS_DECLARE_DRV(UART, &uart_dev)
|
||||
Reference in New Issue
Block a user