first init

This commit is contained in:
2026-04-10 18:10:51 +08:00
commit 51e34c4679
15 changed files with 837 additions and 0 deletions

View File

@@ -0,0 +1 @@
reserve

View File

@@ -0,0 +1 @@
reserve

View 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)

View File

@@ -0,0 +1,16 @@
#include "has_platform.h"
int video_open(int param)
{
printf("init video %d\n", param);
return 0;
}
static Device_stu_t video_dev = {
.open = video_open,
.close = NULL,
.write = NULL,
.read = NULL,
.drv_ctl = NULL,
};
HAS_DECLARE_DRV(VIDEO, &video_dev)

View File

@@ -0,0 +1,31 @@
#include "has_platform.h"
#include <string.h>
int wakeup_src_open(int param)
{
(void)param;
return 0;
}
int wakeup_src_read(int param,void *buff,unsigned int len)
{
(void)param;
memset(buff, 0, len);
return 0;
}
int wakeup_src_write(int param,void *buff,unsigned int len)
{
(void)param;
memset(buff, 0, len);
return 0;
}
static Device_stu_t wake_up_src_dev = {
.open = wakeup_src_open,
.close = NULL,
.write = wakeup_src_write,
.read = wakeup_src_read,
.drv_ctl = NULL,
};
HAS_DECLARE_DRV(WAKE_UP_SRC, &wake_up_src_dev)