forked from xuos/xiuos
fix errors of naming function
This commit is contained in:
parent
49df162734
commit
c1976c8d92
|
@ -85,7 +85,7 @@ void TestTouch(void)
|
|||
PrivWrite(lcd_fd, &graph_param, NULL_PARAMETER);
|
||||
}
|
||||
|
||||
uint16 color_select[20];
|
||||
uint16 color_select[LCD_SIZE];
|
||||
memset(color_select,0xff,sizeof(color_select));
|
||||
graph_param.pixel_info.pixel_color = &color_select;
|
||||
while(1){
|
||||
|
|
|
@ -30,10 +30,10 @@ void HumiHs300x(void)
|
|||
int32_t humidity;
|
||||
struct SensorQuantity *humi = SensorQuantityFind(SENSOR_QUANTITY_HS300X_HUMIDITY, SENSOR_QUANTITY_HUMI);
|
||||
SensorQuantityOpen(humi);
|
||||
for (i = 0; i < 100; i ++) {
|
||||
for (i = 0; i < 10; i ++) {
|
||||
humidity = SensorQuantityReadValue(humi);
|
||||
printf("Humidity : %d.%d %%RH\n", humidity/10, humidity%10);
|
||||
PrivTaskDelay(5000);
|
||||
PrivTaskDelay(500);
|
||||
}
|
||||
SensorQuantityClose(humi);
|
||||
}
|
|
@ -30,14 +30,14 @@ void TempHs300x(void)
|
|||
int32_t temperature;
|
||||
struct SensorQuantity *temp = SensorQuantityFind(SENSOR_QUANTITY_HS300X_TEMPERATURE, SENSOR_QUANTITY_TEMP);
|
||||
SensorQuantityOpen(temp);
|
||||
for (i = 0; i < 100; i ++) {
|
||||
for (i = 0; i < 10; i ++) {
|
||||
temperature = SensorQuantityReadValue(temp);
|
||||
if (temperature > 0)
|
||||
printf("Temperature : %d.%d ℃\n", temperature/10, temperature%10);
|
||||
else
|
||||
printf("Temperature : %d.%d ℃\n", temperature/10, -temperature%10);
|
||||
|
||||
PrivTaskDelay(5000);
|
||||
PrivTaskDelay(500);
|
||||
}
|
||||
|
||||
SensorQuantityClose(temp);
|
||||
|
|
|
@ -6,6 +6,12 @@ ifeq ($(CONFIG_ADD_NUTTX_FETURES),y)
|
|||
|
||||
endif
|
||||
|
||||
ifeq ($(ADD_XIZI_FETURES),y)
|
||||
include $(APPDIR)/Make.defs
|
||||
CSRCS += sensor.c
|
||||
include $(APPDIR)/Application.mk
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ADD_XIZI_FETURES),y)
|
||||
SRC_FILES := sensor.c
|
||||
|
||||
|
@ -59,3 +65,57 @@ ifeq ($(CONFIG_ADD_XIZI_FETURES),y)
|
|||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
||||
|
||||
ifeq ($(ADD_XIZI_FETURES),y)
|
||||
SRC_FILES := sensor.c
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_HCHO),y)
|
||||
SRC_DIR += hcho
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_TVOC),y)
|
||||
SRC_DIR += tvoc
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_IAQ),y)
|
||||
SRC_DIR += iaq
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_CH4),y)
|
||||
SRC_DIR += ch4
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_CO2),y)
|
||||
SRC_DIR += co2
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_PM),y)
|
||||
SRC_DIR += pm
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_VOICE),y)
|
||||
SRC_DIR += voice
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_TEMPERATURE),y)
|
||||
SRC_DIR += temperature
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_HUMIDITY),y)
|
||||
SRC_DIR += humidity
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_WINDSPEED),y)
|
||||
SRC_DIR += windspeed
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_WINDDIRECTION),y)
|
||||
SRC_DIR += winddirection
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SENSOR_ALTITUDE),y)
|
||||
SRC_DIR += altitude
|
||||
endif
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
|
@ -43,7 +43,7 @@ static struct CameraCfg sensor_config = {
|
|||
.gain = 0x00
|
||||
};
|
||||
|
||||
static uint32 dvpDrvInit(void)
|
||||
static uint32 DvpDrvInit(void)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
dvp_init(SCCB_REG_LENGTH);
|
||||
|
@ -53,7 +53,7 @@ static uint32 dvpDrvInit(void)
|
|||
dvp_set_output_enable(DVP_OUTPUT_DISPLAY, 0);
|
||||
dvp_set_output_enable(DVP_OUTPUT_AI, 0);
|
||||
ov2640_init();
|
||||
sensorConfigure(&sensor_config);
|
||||
SensorConfigure(&sensor_config);
|
||||
|
||||
sysctl_set_spi0_dvp_data(1);
|
||||
#ifdef DVP_BURST_ENABLE
|
||||
|
@ -77,28 +77,28 @@ static uint32 dvpDrvInit(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static uint32 readDvpReg(void *drv, struct DvpRegConfigureInfo *reg_info)
|
||||
static uint32 ReadDvpReg(void *drv, struct DvpRegConfigureInfo *reg_info)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
reg_info->reg_value = dvp_sccb_receive_data(reg_info->device_addr, reg_info->reg_addr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint32 writeDvpReg(void *drv, struct DvpRegConfigureInfo *reg_info)
|
||||
static uint32 WriteDvpReg(void *drv, struct DvpRegConfigureInfo *reg_info)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
dvp_sccb_send_data(reg_info->device_addr, reg_info->reg_addr, reg_info->reg_value);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint32 dvpOpen(void *dev)
|
||||
static uint32 DvpOpen(void *dev)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
dvpDrvInit();
|
||||
DvpDrvInit();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint32 dvpClose(void *dev)
|
||||
static uint32 DvpClose(void *dev)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);
|
||||
|
@ -107,7 +107,7 @@ static uint32 dvpClose(void *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static uint32 dvpRead(void *dev, struct BusBlockReadParam *read_param)
|
||||
static uint32 DvpRead(void *dev, struct BusBlockReadParam *read_param)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
|
||||
|
@ -119,7 +119,7 @@ static uint32 dvpRead(void *dev, struct BusBlockReadParam *read_param)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static uint32 dvpDrvConfigure(void *drv, struct BusConfigureInfo *args)
|
||||
static uint32 DvpDrvConfigure(void *drv, struct BusConfigureInfo *args)
|
||||
{
|
||||
x_err_t ret = EOK;
|
||||
|
||||
|
@ -131,15 +131,15 @@ static uint32 dvpDrvConfigure(void *drv, struct BusConfigureInfo *args)
|
|||
break;
|
||||
case OPE_CFG:
|
||||
tmp_cfg = (struct CameraCfg *)args->private_data;
|
||||
sensorConfigure(tmp_cfg);
|
||||
SensorConfigure(tmp_cfg);
|
||||
dvp_set_image_size(tmp_cfg->output_w, tmp_cfg->output_h);
|
||||
break;
|
||||
case REG_SCCB_READ:
|
||||
readDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data);
|
||||
ReadDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data);
|
||||
break;
|
||||
case REG_SCCB_WRITE:
|
||||
//for ov2640,write reg 0x04 to Horizontal mirror or Vertical flip
|
||||
writeDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data);
|
||||
WriteDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -150,10 +150,10 @@ static uint32 dvpDrvConfigure(void *drv, struct BusConfigureInfo *args)
|
|||
/*manage the camera device operations*/
|
||||
static const struct CameraDevDone camera_dev_done =
|
||||
{
|
||||
.dev_open = dvpOpen,
|
||||
.dev_close = dvpClose,
|
||||
.dev_open = DvpOpen,
|
||||
.dev_close = DvpClose,
|
||||
.dev_write = NONE,
|
||||
.dev_read = dvpRead,
|
||||
.dev_read = DvpRead,
|
||||
};
|
||||
|
||||
/*Init camera bus*/
|
||||
|
@ -225,7 +225,7 @@ int HwDvpInit(void)
|
|||
static struct CameraDriver camera_driver;
|
||||
memset(&camera_driver, 0, sizeof(struct CameraDriver));
|
||||
|
||||
camera_driver.configure = dvpDrvConfigure;
|
||||
camera_driver.configure = DvpDrvConfigure;
|
||||
ret = BoardCameraBusInit(&camera_bus, &camera_driver);
|
||||
if (EOK != ret)
|
||||
{
|
||||
|
|
|
@ -425,7 +425,7 @@ int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int sensorConfigure(struct CameraCfg *cfg_info)
|
||||
int SensorConfigure(struct CameraCfg *cfg_info)
|
||||
{
|
||||
uint8_t reg_tmp;
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2020 AIIT XUOS Lab
|
||||
* XiUOS is licensed under Mulan PSL v2.
|
||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
* You may obtain a copy of Mulan PSL v2 at:
|
||||
* http://license.coscl.org.cn/MulanPSL2
|
||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file connect_dvp.h
|
||||
* @brief define edu-riscv64-board DVP init function
|
||||
* @version 2.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2022-11-21
|
||||
*/
|
||||
#ifndef CONNECT_DVP_H
|
||||
#define CONNECT_DVP_H
|
||||
#include <device.h>
|
||||
|
|
|
@ -33,6 +33,6 @@ struct CameraCfg
|
|||
|
||||
int ov2640_init(void);
|
||||
int ov2640_read_id(uint16_t *manuf_id, uint16_t *device_id);
|
||||
int sensorConfigure(struct CameraCfg* cfg_info);
|
||||
int SensorConfigure(struct CameraCfg* cfg_info);
|
||||
|
||||
#endif /* _OV2640_H */
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <dev_spi.h>
|
||||
#include <bus_spi.h>
|
||||
|
||||
static x_err_t softSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *cfg)
|
||||
static x_err_t SoftSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *cfg)
|
||||
{
|
||||
NULL_PARAM_CHECK(spi_drv);
|
||||
NULL_PARAM_CHECK(cfg);
|
||||
|
@ -29,7 +29,7 @@ static x_err_t softSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *c
|
|||
return EOK;
|
||||
}
|
||||
|
||||
static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_info)
|
||||
static uint32 SoftSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_info)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv);
|
||||
NULL_PARAM_CHECK(configure_info);
|
||||
|
@ -41,7 +41,7 @@ static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_
|
|||
switch (configure_info->configure_cmd)
|
||||
{
|
||||
case OPE_INT:
|
||||
softSPIinit(spi_drv, configure_info);
|
||||
SoftSPIinit(spi_drv, configure_info);
|
||||
break;
|
||||
|
||||
case OPE_CFG:
|
||||
|
@ -54,7 +54,7 @@ static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void soft_spi_writebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
static void SoftSpiWriteByte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
{
|
||||
int8_t i = 0;
|
||||
uint8_t temp = 0;
|
||||
|
@ -79,7 +79,7 @@ static void soft_spi_writebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
|||
}
|
||||
|
||||
/* 读一个字节 */
|
||||
static uint8_t soft_spi_readbyte(struct SpiHardwareDevice *spi_dev)
|
||||
static uint8_t SoftSpiReadbyte(struct SpiHardwareDevice *spi_dev)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
uint8_t read_data = 0xFF;
|
||||
|
@ -100,7 +100,7 @@ static uint8_t soft_spi_readbyte(struct SpiHardwareDevice *spi_dev)
|
|||
|
||||
/* 读写一个字节 */
|
||||
// this funcition is unverify until now!
|
||||
static uint8_t soft_spi_readwritebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
static uint8_t SoftSpiReadWriteByte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
uint8_t temp = 0;
|
||||
|
@ -129,7 +129,7 @@ static uint8_t soft_spi_readwritebyte(struct SpiHardwareDevice *spi_dev, uint8_t
|
|||
return read_data;
|
||||
}
|
||||
|
||||
static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
static uint32 SoftSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
{
|
||||
SpiDeviceParam *dev_param = (SpiDeviceParam *)(spi_dev->haldev.private_data);
|
||||
|
||||
|
@ -148,7 +148,7 @@ static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiData
|
|||
|
||||
for (size_t i = 0; i < data_length; i++)
|
||||
{
|
||||
soft_spi_writebyte(spi_dev, data_buff[i]);
|
||||
SoftSpiWriteByte(spi_dev, data_buff[i]);
|
||||
}
|
||||
|
||||
if (spi_datacfg->spi_cs_release)
|
||||
|
@ -160,7 +160,7 @@ static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiData
|
|||
return EOK;
|
||||
}
|
||||
|
||||
static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
static uint32 SoftSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
{
|
||||
SpiDeviceParam *dev_param = (SpiDeviceParam *)(spi_dev->haldev.private_data);
|
||||
uint8 cs_gpio_pin = dev_param->spi_slave_param->spi_cs_gpio_pin;
|
||||
|
@ -179,7 +179,7 @@ static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataS
|
|||
|
||||
for (size_t i = 0; i < recv_length; i++)
|
||||
{
|
||||
recv_buff[i] = soft_spi_readbyte(spi_dev);
|
||||
recv_buff[i] = SoftSpiReadbyte(spi_dev);
|
||||
}
|
||||
|
||||
if (spi_datacfg->spi_cs_release)
|
||||
|
@ -195,8 +195,8 @@ static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataS
|
|||
const struct SpiDevDone soft_spi_dev_done = {
|
||||
.dev_close = NONE,
|
||||
.dev_open = NONE,
|
||||
.dev_read = softSpiReadData,
|
||||
.dev_write = softSpiWriteData};
|
||||
.dev_read = SoftSpiReadData,
|
||||
.dev_write = SoftSpiWriteData};
|
||||
|
||||
static int BoardSoftSpiBusInit(struct SpiBus *spi_bus, struct SpiDriver *spi_driver)
|
||||
{
|
||||
|
@ -275,7 +275,7 @@ int HwSoftSPIInit(void)
|
|||
static struct SpiDriver spi_driver;
|
||||
memset(&spi_driver, 0, sizeof(struct SpiDriver));
|
||||
|
||||
spi_driver.configure = &(softSpiDrvConfigure);
|
||||
spi_driver.configure = &(SoftSpiDrvConfigure);
|
||||
|
||||
ret = BoardSoftSpiBusInit(&spi_bus, &spi_driver);
|
||||
if (EOK != ret)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <dev_spi.h>
|
||||
#include <bus_spi.h>
|
||||
|
||||
static x_err_t softSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *cfg)
|
||||
static x_err_t SoftSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *cfg)
|
||||
{
|
||||
NULL_PARAM_CHECK(spi_drv);
|
||||
NULL_PARAM_CHECK(cfg);
|
||||
|
@ -29,7 +29,7 @@ static x_err_t softSPIinit(struct SpiDriver *spi_drv, struct BusConfigureInfo *c
|
|||
return EOK;
|
||||
}
|
||||
|
||||
static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_info)
|
||||
static uint32 SoftSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_info)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv);
|
||||
NULL_PARAM_CHECK(configure_info);
|
||||
|
@ -41,7 +41,7 @@ static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_
|
|||
switch (configure_info->configure_cmd)
|
||||
{
|
||||
case OPE_INT:
|
||||
softSPIinit(spi_drv, configure_info);
|
||||
SoftSPIinit(spi_drv, configure_info);
|
||||
break;
|
||||
|
||||
case OPE_CFG:
|
||||
|
@ -54,7 +54,7 @@ static uint32 softSpiDrvConfigure(void *drv, struct BusConfigureInfo *configure_
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void soft_spi_writebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
static void SoftSpiWriteByte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
{
|
||||
int8_t i = 0;
|
||||
uint8_t temp = 0;
|
||||
|
@ -79,7 +79,7 @@ static void soft_spi_writebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
|||
}
|
||||
|
||||
/* 读一个字节 */
|
||||
static uint8_t soft_spi_readbyte(struct SpiHardwareDevice *spi_dev)
|
||||
static uint8_t SoftSpiReadByte(struct SpiHardwareDevice *spi_dev)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
uint8_t read_data = 0xFF;
|
||||
|
@ -100,7 +100,7 @@ static uint8_t soft_spi_readbyte(struct SpiHardwareDevice *spi_dev)
|
|||
|
||||
/* 读写一个字节 */
|
||||
// this funcition is unverify until now!
|
||||
static uint8_t soft_spi_readwritebyte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
static uint8_t SoftSpiReadWriteByte(struct SpiHardwareDevice *spi_dev, uint8_t data)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
uint8_t temp = 0;
|
||||
|
@ -129,7 +129,7 @@ static uint8_t soft_spi_readwritebyte(struct SpiHardwareDevice *spi_dev, uint8_t
|
|||
return read_data;
|
||||
}
|
||||
|
||||
static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
static uint32 SoftSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
{
|
||||
SpiDeviceParam *dev_param = (SpiDeviceParam *)(spi_dev->haldev.private_data);
|
||||
|
||||
|
@ -148,7 +148,7 @@ static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiData
|
|||
|
||||
for (size_t i = 0; i < data_length; i++)
|
||||
{
|
||||
soft_spi_writebyte(spi_dev, data_buff[i]);
|
||||
SoftSpiWriteByte(spi_dev, data_buff[i]);
|
||||
}
|
||||
|
||||
if (spi_datacfg->spi_cs_release)
|
||||
|
@ -160,7 +160,7 @@ static uint32 softSpiWriteData(struct SpiHardwareDevice *spi_dev, struct SpiData
|
|||
return EOK;
|
||||
}
|
||||
|
||||
static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
static uint32 SoftSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataStandard *spi_datacfg)
|
||||
{
|
||||
SpiDeviceParam *dev_param = (SpiDeviceParam *)(spi_dev->haldev.private_data);
|
||||
uint8 cs_gpio_pin = dev_param->spi_slave_param->spi_cs_gpio_pin;
|
||||
|
@ -179,7 +179,7 @@ static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataS
|
|||
|
||||
for (size_t i = 0; i < recv_length; i++)
|
||||
{
|
||||
recv_buff[i] = soft_spi_readbyte(spi_dev);
|
||||
recv_buff[i] = SoftSpiReadByte(spi_dev);
|
||||
}
|
||||
|
||||
if (spi_datacfg->spi_cs_release)
|
||||
|
@ -195,8 +195,8 @@ static uint32 softSpiReadData(struct SpiHardwareDevice *spi_dev, struct SpiDataS
|
|||
const struct SpiDevDone soft_spi_dev_done = {
|
||||
.dev_close = NONE,
|
||||
.dev_open = NONE,
|
||||
.dev_read = softSpiReadData,
|
||||
.dev_write = softSpiWriteData};
|
||||
.dev_read = SoftSpiReadData,
|
||||
.dev_write = SoftSpiWriteData};
|
||||
|
||||
static int BoardSoftSpiBusInit(struct SpiBus *spi_bus, struct SpiDriver *spi_driver)
|
||||
{
|
||||
|
@ -275,7 +275,7 @@ int HwSoftSPIInit(void)
|
|||
static struct SpiDriver spi_driver;
|
||||
memset(&spi_driver, 0, sizeof(struct SpiDriver));
|
||||
|
||||
spi_driver.configure = &(softSpiDrvConfigure);
|
||||
spi_driver.configure = &(SoftSpiDrvConfigure);
|
||||
|
||||
ret = BoardSoftSpiBusInit(&spi_bus, &spi_driver);
|
||||
if (EOK != ret)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @brief define camera bus and drv function using bus driver framework
|
||||
* @version 1.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2021-11-16
|
||||
* @date 2022-11-15
|
||||
*/
|
||||
|
||||
#ifndef BUS_CAMERA_H
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @brief define camera dev function using bus driver framework
|
||||
* @version 1.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2021-04-24
|
||||
* @date 2022-11-15
|
||||
*/
|
||||
|
||||
#ifndef DEV_CAMERA_H
|
||||
|
|
Loading…
Reference in New Issue