summaryrefslogtreecommitdiff
path: root/bsp/ft2004/drivers/drv_can.h
blob: 92e809eb1e1d7c3311abdd8708e3b5965ccf477e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-05-11     Carl        the first version
 */

#ifndef __DRV_CAN_H__
#define __DRV_CAN_H__

#ifdef __cplusplus
extern "C"
{
#endif

#include <board.h>
#include <rtdevice.h>
#include <rtthread.h>
#include "ft_can.h"

    struct ft2004_can
    {
        const char *name;
        FCan_t can_handle;
        struct rt_semaphore recv_semaphore;
        struct rt_can_device device; /* inherit from can device */
    };

    int rt_hw_can_init(void);

#ifdef __cplusplus
}
#endif

#endif // !