mirror of
https://github.com/supleed2/EIE4-FYP.git
synced 2024-11-09 20:05:49 +00:00
Aadi Desai
6cf6d0a643
Get / Set CAN filter ID Get / Set CAN filter mask Get latest valid CAN frame in `can_frame` struct
24 lines
325 B
Plaintext
24 lines
325 B
Plaintext
#include <generated/csr.h>
|
|
#include <stdint.h>
|
|
|
|
#pragma once
|
|
|
|
// Struct Definition
|
|
|
|
struct can_frame {
|
|
uint16_t id;
|
|
uint8_t data[8];
|
|
};
|
|
|
|
// Function Declarations
|
|
|
|
uint32_t can_id_read(void);
|
|
|
|
void can_id_write(uint32_t value);
|
|
|
|
uint32_t can_mask_read(void);
|
|
|
|
void can_mask_write(uint32_t value);
|
|
|
|
can_frame can_read(void);
|