blob: 9e17c612fd7f285f04bb82e008b7d15b68d5a0b6 (
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
39
40
41
42
43
44
45
46
47
48
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-10-29 mazhiyuan first version
*/
#ifndef __DRV_CAN_H__
#define __DRV_CAN_H__
#include <rtthread.h>
#include <rtdevice.h>
#include <rthw.h>
#include <drv_common.h>
#include <drv_config.h>
#include <hal_data.h>
/* renesas config class */
struct ra_can_config
{
const char *name;
int num_of_mailboxs;
can_ctrl_t *const p_api_ctrl;
can_cfg_t const *const p_cfg;
};
struct ra_can
{
struct rt_can_device can_dev;
struct ra_can_config *config;
can_callback_args_t *callback_args;
};
struct ra_baud_rate_tab
{
rt_uint32_t baud_rate;
rt_uint32_t sjw;
rt_uint32_t ts1;
rt_uint32_t ts2;
rt_uint32_t prescaler;
};
int rt_hw_can_init(void);
#endif
|