still working on consolidation of init

This commit is contained in:
soypat
2024-01-15 01:04:39 -03:00
parent 845bd6fe93
commit 7db9e9d6db
5 changed files with 442 additions and 157 deletions
+5
View File
@@ -15,6 +15,9 @@ const (
_R1_ERASE_SEQUENCE_ERROR = 1 << 4
_R1_ADDRESS_ERROR = 1 << 5
_R1_PARAMETER_ERROR = 1 << 6
_DATA_RES_MASK = 0x1F
_DATA_RES_ACCEPTED = 0x05
)
type response1 uint8
@@ -81,6 +84,8 @@ func makeResponseError(status response1) error {
}
}
// func (c *SPICard) lastR1() r1 { return c.lastr1 }
// is part of specification but not used in every implementation out there...
func (d *SPICard) readR1() (resp r1, err error) {
first, ok := d.waitToken(d.timeout, 0xff)