redesigned dir structure for rust 2018 style guide. made (untested) rtc funtion

This commit is contained in:
Philipp_EndevourOS
2025-07-28 17:25:39 +02:00
parent 4dda9548d3
commit 49027fed99
23 changed files with 168 additions and 390 deletions

9
src/drivers/fram.rs Normal file
View 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