mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-09 15:55:37 +00:00
lib.rs: improve TODO instructions, add book link
This commit is contained in:
parent
111b5209c8
commit
4906aa6457
1 changed files with 9 additions and 7 deletions
|
@ -54,13 +54,15 @@ impl Request {
|
|||
const SET_ADDRESS: u8 = 5;
|
||||
|
||||
// TODO implement another branch handling GET_DESCRIPTOR requests:
|
||||
|
||||
// 1. get descriptor type and descriptor index from wValue
|
||||
|
||||
// 2. confirm that the descriptor
|
||||
// - is of type DEVICE and
|
||||
// - has descriptor index 0 (i.e. it is the first implemented descriptor for this type) and
|
||||
// - has wIndex 0 (i.e. no language ID since it's not a string descriptor)
|
||||
//
|
||||
// 1. get descriptor type and descriptor index from `wValue`
|
||||
//
|
||||
// 2. confirm that
|
||||
// - the descriptor type is DEVICE, i.e. of value 1 and
|
||||
// - the descriptor index is 0 (i.e. it is the first implemented descriptor for this type) and
|
||||
// - `wIndex` is 0 (i.e. no language ID since it's not a string descriptor)
|
||||
//
|
||||
// For more details, see https://embedded-trainings.ferrous-systems.com/setup-stage.html
|
||||
|
||||
if bmrequesttype == 0b00000000 && brequest == SET_ADDRESS {
|
||||
// Set the device address for all future accesses.
|
||||
|
|
Loading…
Reference in a new issue