mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-07-30 21:44:16 +00:00
added hardware files (rtc and fram)
This commit is contained in:
parent
23bb1126a6
commit
9b4df77112
9
src/hardware/fram.rs
Normal file
9
src/hardware/fram.rs
Normal file
@ -0,0 +1,9 @@
|
||||
const DEVICE_TYPE_CODE: u8 = 0b10100000;
|
||||
|
||||
const DEVICE_ADDRESS_CODE: u8 = 0b000000; // 3 bits for device address | default A0 = 0 A1 = 0 A2 = 0
|
||||
|
||||
const WRITE_CODE: u8 = 0b00000000; // 0 for write
|
||||
const READ_CODE: u8 = 0b00000001; // 1 for read
|
||||
|
||||
const DEVICE_ADDRESS_WRITE: u8 = DEVICE_TYPE_CODE | DEVICE_ADDRESS_CODE | WRITE_CODE; // I2C address write for FRAM
|
||||
const DEVICE_ADDRESS_READ: u8 = DEVICE_TYPE_CODE | DEVICE_ADDRESS_CODE | READ_CODE; // I2C address read for FRAM
|
0
src/hardware/rtc.rs
Normal file
0
src/hardware/rtc.rs
Normal file
Loading…
x
Reference in New Issue
Block a user