You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/technical-reference/eeprom.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ This document is a work in progress. More details will be added as they become a
6
6
If you want your eeprom-equipped hexpansion to do something automatically, you need to write some data to the eeprom. The data consists of a header which contains hexpansion metadata and a littlefs file system which contains your application and data. The minimal application consists of a file called `app.py` that contains your code.
7
7
8
8
We will look for eeproms on the following i2c addresses:
9
-
- 0x50
10
9
- 0x57
10
+
- 0x50
11
11
12
12
The header is 32 bytes long and contains the following values:
13
13
@@ -25,7 +25,7 @@ The header is 32 bytes long and contains the following values:
25
25
- 4 bytes total size (total filesystem size in bytes)
26
26
- VID/PID (offset 16, length 4)
27
27
- 2 bytes VID
28
-
- This is a Vendor ID. To obtain a Vendor ID, contact the Unnecessary Hexpansion Bureaucracy Implementers Forum (UHB-IF) at (location to be disclosed). If you don't want to do that, use vendor id f055.
28
+
- This is a Vendor ID. Vendor IDs are assigned by the Unnecessary Hexpansion Bureaucracy Implementers Forum ([UHB-IF](https://badge.emfcamp.org/wiki/UHB-IF)) To obtain a Vendor ID, contact the UHB-IF at (location to be disclosed). If you don't want to do that, use a vendor ID from [here](https://badge.emfcamp.org/wiki/UHB-IF/Uncontrolled_IDs).
29
29
- 2 bytes PID
30
30
- This is a Product ID. If you have a Vendor ID, you can choose your own Product ID. If you are using the free-for-all Vendor ID, you will have to coordinate number assignments with other users on a wiki page (to be disclosed). Each hexpansion design with an eeprom needs a unique VID/PID combination.
31
31
- Unique ID (offset 20, length 2)
@@ -43,15 +43,15 @@ The header is 32 bytes long and contains the following values:
43
43
44
44
```python
45
45
46
-
defcalc_checksum(header): #header assumed to be of type bytes
47
-
value=0x55
48
-
for b in header[1:]:
49
-
value= value ^ b
50
-
return value
46
+
defcalc_checksum(header): #header assumed to be of type bytes
47
+
value=0x55
48
+
for b in header[1:]:
49
+
value= value ^ b
50
+
return value
51
51
52
-
header_w_checksum = header+bytes([calc_checksum(header)]) #to generate a checksum
52
+
header_w_checksum = header+bytes([calc_checksum(header)]) #to generate a checksum
53
53
54
-
calc_checksum(header_w_checksum) # should return 0 if checksum is correct
54
+
calc_checksum(header_w_checksum) # should return 0 if checksum is correct
0 commit comments