diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2019-03-19 12:58:27 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <v.eriksen@diinef.com> | 2019-03-19 13:02:30 +0100 |
commit | 41e3e88a1728a191c5027cec7fb3c6ae833d564a (patch) | |
tree | 6b572d7cad741c09f5cb036665ea3c42514e6657 | |
parent | 6572616a6b4bded686a22377d839cef7506de24d (diff) |
CAN: Grouped mailbox registers.
-rw-r--r-- | can/can.h | 32 |
1 files changed, 9 insertions, 23 deletions
@@ -7,35 +7,21 @@ struct CAN_reg_t { volatile uint32_t MCR; volatile uint32_t MSR; volatile uint32_t TSR; - volatile uint32_t RF0R; - volatile uint32_t RF1R; + volatile uint32_t RFR[2]; volatile uint32_t IER; volatile uint32_t ESR; volatile uint32_t BTR; }; struct CAN_mb_reg_t { - volatile uint32_t TI0R; - volatile uint32_t TDT0R; - volatile uint32_t TDL0R; - volatile uint32_t TDH0R; - volatile uint32_t TI1R; - volatile uint32_t TDT1R; - volatile uint32_t TDL1R; - volatile uint32_t TDH1R; - volatile uint32_t TI2R; - volatile uint32_t TDT2R; - volatile uint32_t TDL2R; - volatile uint32_t TDH2R; - volatile uint32_t RI0R; - volatile uint32_t RDT0R; - volatile uint32_t RDL0R; - volatile uint32_t RDH0R; - volatile uint32_t RI1R; - volatile uint32_t RDT1R; - volatile uint32_t RDL1R; - volatile uint32_t RDH1R; - + struct mb_t { + volatile uint32_t IR; + volatile uint32_t DTR; + volatile uint32_t DLR; + volatile uint32_t DHR; + }; + mb_t T[3]; + mb_t R[2]; }; struct CAN_f_reg_t { |