2022-10-20 09:40:14 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2022-07-13 19:56:14 +08:00
|
|
|
*
|
2022-10-20 09:40:14 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2022-07-13 19:56:14 +08:00
|
|
|
*
|
2022-10-20 09:40:14 +08:00
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-10-19 Nations first version
|
2022-07-13 19:56:14 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRV_SPI_H__
|
|
|
|
#define __DRV_SPI_H__
|
|
|
|
|
|
|
|
#include <rthw.h>
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include <board.h>
|
|
|
|
|
2022-10-20 09:40:14 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-07-13 19:56:14 +08:00
|
|
|
struct n32_spi_cs
|
|
|
|
{
|
|
|
|
GPIO_Module* GPIOx;
|
|
|
|
uint32_t GPIO_Pin;
|
|
|
|
};
|
|
|
|
|
|
|
|
int rt_hw_spi_init(void);
|
|
|
|
|
2022-10-20 09:40:14 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-07-13 19:56:14 +08:00
|
|
|
#endif /* __DRV_SPI_H__ */
|