Base class for CAN abstraction.
More...
#include <can.hpp>
|
using | Impl = CanImpl< Context > |
|
template<auto Context, template< auto > typename CanImpl>
struct bsp::drv::CAN< Context, CanImpl >
Base class for CAN abstraction.
- Template Parameters
-
Context | CAN context |
CanImpl | CAN implementation |
◆ Impl
template<auto Context, template< auto > typename CanImpl>
◆ CAN()
template<auto Context, template< auto > typename CanImpl>
◆ deinit()
template<auto Context, template< auto > typename CanImpl>
static auto bsp::drv::CAN< Context, CanImpl >::deinit |
( |
auto ... |
args | ) |
|
|
inlinestatic |
◆ disable()
template<auto Context, template< auto > typename CanImpl>
◆ disableFilter()
template<auto Context, template< auto > typename CanImpl>
Filter bank disable.
- Parameters
-
- Returns
- Success
◆ enable()
template<auto Context, template< auto > typename CanImpl>
◆ init()
template<auto Context, template< auto > typename CanImpl>
static auto bsp::drv::CAN< Context, CanImpl >::init |
( |
auto ... |
args | ) |
|
|
inlinestatic |
Init function.
- Note
- Filter bank 0 will be set to 0 0 to accept all IDs
- Returns
- Success
◆ read()
template<auto Context, template< auto > typename CanImpl>
template<typename T >
CAN read function.
- Template Parameters
-
- Returns
- Read data in a CANpacket
◆ setExtFilter()
template<auto Context, template< auto > typename CanImpl>
Extended ID filter configuration function.
- Parameters
-
bank | Filterbank 0 to 28 |
id | Standard ID 0 to 0x1FFFFFFF |
mask | Filtermask 0 to 0x1FFFFFFF |
- Returns
- Success
- Warning
- This function might have complications with PCAN
◆ setStdFilter()
template<auto Context, template< auto > typename CanImpl>
Standard ID filter configuration function.
- Parameters
-
bank | Filterbank 0 to 28 |
id | Standard ID 0 to 0x7FF |
mask | Filtermask 0 to 0x7FF |
- Returns
- Success
◆ write() [1/2]
template<auto Context, template< auto > typename CanImpl>
template<typename T >
CAN write function.
- Template Parameters
-
- Parameters
-
packet | CAN packet to write |
◆ write() [2/2]
template<auto Context, template< auto > typename CanImpl>
template<typename T >
CAN write function.
- Template Parameters
-
- Parameters
-
id | CAN id |
data | Data to write |
The documentation for this struct was generated from the following file: