Skip to content

Commit 680c7c8

Browse files
committed
Updates to Command Table.
Also added datasheets for STM32.
1 parent 9e9abbc commit 680c7c8

5 files changed

Lines changed: 26 additions & 15 deletions

README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -126,30 +126,41 @@ This command writes to an address in the NBMC. The payload is the 8-bit register
126126
| Address | Name | Type | Contains | Length |
127127
| ------- | ------------------------------------- | ----- | -------------------------------------------------------- | ------ |
128128
| 0x00 | Firmware Version | RO | The NBMC firmware version, as a null-padded UTF-8 string | 64 |
129-
| 0x01 | Hardware Version | RO | The NBMC firmware version, as a null-padded UTF-8 string | 64 |
130-
| 0x02 | Interrupt Status | R/W1C | Which interrupts are currently active, as a bitmask. | 2 |
129+
| 0x01 | Interrupt Status | R/W1C | Which interrupts are currently active, as a bitmask. | 2 |
131130
| 0x02 | Interrupt Control | R/W | Which interrupts are currently enabled, as a bitmask. | 2 |
132-
| 0x10 | UART Receive/Transmit Buffer | FIFO | Data received over the UART | max 64 |
131+
| 0x03 | LED Control | R/W | Settings for the LED outputs | 1 |
132+
| 0x04 | Button Status | RO | The current state of the buttons | 1 |
133+
| 0x05 | System Temperature | RO | Temperature in °C, as an `i8` | 1 |
134+
| 0x10 | UART Receive/Transmit Buffer | FIFO | Data received/to be sent over the UART | max 64 |
133135
| 0x11 | UART FIFO Control | R/W | Settings for the UART FIFO | 1 |
134-
| 0x12 | UART Control | R/W | ... | 1 |
135-
| 0x13 | UART Status | R/W | ... | 1 |
136-
| 0x14 | UART Baud Rate | R/W | ... | 4 |
137-
| 0x20 | PS/2 Keyboard Receive/Transmit Buffer | FIFO | ... | max 16 |
138-
| 0x22 | PS/2 Keyboard Control | R/W | ... | 1 |
139-
| 0x23 | PS/2 Keyboard Status | R/W1C | ... | 1 |
140-
| 0x30 | PS/2 Mouse Receive/Transmit Buffer | FIFO | ... | max 16 |
141-
| 0x32 | PS/2 Mouse Control | R/W | ... | 1 |
142-
| 0x33 | PS/2 Mouse Status | R/W1C | ... | 1 |
143-
| 0x40 | LED Control | R/W | ... | 1 |
144-
| 0x41 | Button Status | RO | ... | 1 |
136+
| 0x12 | UART Control | R/W | Settings for the UART | 1 |
137+
| 0x13 | UART Status | R/W1C | The current state of the UART | 1 |
138+
| 0x14 | UART Baud Rate | R/W | The UART baud rate in bps, as a `u32le` | 4 |
139+
| 0x20 | PS/2 Keyboard Receive/Transmit Buffer | FIFO | Data received/to be sent over the PS/2 keyboard port | max 16 |
140+
| 0x21 | PS/2 Keyboard Control | R/W | Settings for the PS/2 Keyboard port | 1 |
141+
| 0x22 | PS/2 Keyboard Status | R/W1C | Current state of the PS/2 Keyboard port | 1 |
142+
| 0x30 | PS/2 Mouse Receive/Transmit Buffer | FIFO | Data received/to be sent over the PS/2 Mouse port | max 16 |
143+
| 0x31 | PS/2 Mouse Control | R/W | Settings for the PS/2 Mouse port | 1 |
144+
| 0x32 | PS/2 Mouse Status | R/W1C | Current state of the PS/2 Mouse port | 1 |
145+
| 0x50 | I²C Receive/Transmit Buffer | FIFO | Data received/to be sent over the I²C Bus | max 16 |
146+
| 0x51 | I²C FIFO Control | R/W | Settings for the I²C FIFO | 1 |
147+
| 0x52 | I²C Control | R/W | Settings for the I²C Bus | 1 |
148+
| 0x53 | I²C Status | R/W1C | Current state of the I²C Bus | 1 |
149+
| 0x54 | I²C Baud Rate | R/W | The I²C clock rate in Hz, as a `u32le` | 4 |
145150

146151
The register types are:
147152

148153
* `RO` - read only register, where writes will return an error
149154
* `R/W` - read/write register
150-
* `R/W1C` - when writing a 1 bit clears that bit position and a 0 bit is ignored, reads are as normal.
155+
* `R/W1C` - reads as usual, but when writing a 1 bit clears that bit position and a 0 bit is ignored
151156
* `FIFO` - a first-in, first-out buffer
152157

158+
### Address 0x00 - Firmware Version
159+
160+
This read-only register returns the firmware version of the NBMC, as a UTF-8 string. The register length is always 64 bytes, and the string is null-padded. We also guarantee that the firmware version will always be less than or equal to 63 bytes, so you can also treat this string as null-terminated.
161+
162+
An official release will have a version string of the form `tags/v1.2.3`. An unofficial release might be `heads/develop-dirty`. It is not recommended that you rely on these formats or attempt to parse the version string. It is however useful if you can quote this string when reporting issues with the firmware.
163+
153164
## Build Requirements
154165

155166
1. rustup and Rust
Binary file not shown.
Binary file not shown.
909 KB
Binary file not shown.

0 commit comments

Comments
 (0)