Fan Yang c1b22ede30
Add BSP for HPM6750EVK and HPM6750EVKMINI (#6374)
* Add CANFD support and correct typos

- Added CANFD required fields to can.h
- Fixed typos in can.h and can.c
- Corrected all the projects affected by the typo
- Fixed wrong line-ending in some affected can driver files

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

* update

* bsp: support boards from hpmicro

- Supported HPM6750EVKMINI
- Supported HPM6750EVK

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
Co-authored-by: Meco Man <920369182@qq.com>
2022-09-06 00:48:16 -04:00

29 lines
472 B
C

/*
* Copyright (c) 2021 hpmicro
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef DRV_SPI_H
#define DRV_SPI_H
#include <rtthread.h>
#include <rtdevice.h>
#include <rthw.h>
#include <stdint.h>
#define SPI_CS_TAKE (0)
#define SPI_CS_RELEASE (1)
typedef void (*cs_ctrl_callback_t)(uint32_t value);
rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name, cs_ctrl_callback_t callback);
int rt_hw_spi_init(void);
#endif /* DRV_SPI_H */