Skip to content

Commit 26f2726

Browse files
committed
Docs: Add warnig re block protocol methods.
1 parent 98ebb3c commit 26f2726

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

eeprom/i2c/I2C.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ Arguments:
135135

136136
With `addr` and `max_chips_count` override, it's possible to make multiple
137137
configuration
138-
138+
139139
example:
140-
140+
141141
array with custom chips count:
142142
```python
143-
eeprom0 = EEPROM( i2c, max_chips_count=2 )
143+
eeprom0 = EEPROM( i2c, max_chips_count=2 )
144144
eeprom1 = EEPROM( i2c, addr=0x52, max_chips_count=2 )
145145
```
146146
1st array using address 0x50 and 0x51 and 2nd using array address 0x52 and 0x53.
@@ -150,7 +150,7 @@ Arguments:
150150
eeprom0 = EEPROM( i2c, addr=0x50, max_chips_count=1 )
151151
eeprom1 = EEPROM( i2c, addr=0x51, max_chips_count=1 )
152152
```
153-
153+
154154
### 4.1.2 Methods providing byte level access
155155

156156
It is possible to read and write individual bytes or arrays of arbitrary size.
@@ -216,6 +216,9 @@ These are provided by the base class. For the protocol definition see
216216
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
217217
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
218218

219+
These methods exist purely to support the block protocol. They are undocumented:
220+
their use in application code is not recommended.
221+
219222
`readblocks()`
220223
`writeblocks()`
221224
`ioctl()`

eeprom/spi/SPI.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ These are provided by the base class. For the protocol definition see
209209
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
210210
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
211211

212+
These methods exist purely to support the block protocol. They are undocumented:
213+
their use in application code is not recommended.
214+
212215
`readblocks()`
213216
`writeblocks()`
214217
`ioctl()`

flash/FLASH.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ chips including those with 24-bit addressing. He tested an XPX XT25F32B; I
1212
tested Winbond W25Q32JV 4MiB and Cypress S25FL064L 8MiB devices.
1313

1414
It is likely that other chips with 4096 byte blocks will work but I am unlikely
15-
to be able to support hardware I don't possess. See
15+
to be able to support hardware I don't possess. See
1616
[Section 6](./FLASH.md#6-unsupported-chips) for recommendations on settings.
1717

1818
## 1.2 The driver
@@ -36,7 +36,7 @@ capacity of flash chips.
3636
FAT and littlefs filesystems are supported but the latter is preferred owing to
3737
its resilience and wear levelling characteristics. Please note that this driver
3838
has been tested on LFS2 only. Users requiring a driver with minimum RAM use
39-
may want to consider [this driver](https://github.com/robert-hh/SPI_Flash).
39+
may want to consider [this driver](https://github.com/robert-hh/SPI_Flash).
4040
This supports an LFS1 filesystem on a single flash chip.
4141

4242
Arguably byte level access on such large devices has few use cases other than
@@ -161,7 +161,7 @@ Arguments. In most cases only the first two mandatory args are required:
161161
6. `block_size=9` The block size reported to the filesystem. The size in bytes
162162
is `2**block_size` so is 512 bytes by default.
163163
7. `cmd5=None` Flash chips can support two low level command sets, a 4 byte
164-
set and a 5 byte set. By default if the size read from the chip's ID is
164+
set and a 5 byte set. By default if the size read from the chip's ID is
165165
<= 4096KiB the 4 byte set is used oterwise the 5 byte set is adopted. This
166166
works for supported chips. Setting `cmd5` `True` forces 5 byte commands,
167167
`False` forces 4 byte. This override is necessary for certain chip types
@@ -271,6 +271,9 @@ These are provided by the base class. For the protocol definition see
271271
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
272272
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
273273

274+
These methods exist purely to support the block protocol. They are undocumented:
275+
their use in application code is not recommended.
276+
274277
`readblocks()`
275278
`writeblocks()`
276279
`ioctl()`
@@ -349,7 +352,7 @@ This driver buffers one sector (4KiB) in RAM. This is necessary to support
349352
access as a byte array. I believed the buffer would confer an advantage when
350353
running a filesystem, but testing suggests that performance is essentially
351354
the same as an unbuffered driver. This appears to be true for littlefs 2 and
352-
FAT. Testing was done by comparison with
355+
FAT. Testing was done by comparison with
353356
[this unbuffered driver](https://github.com/robert-hh/SPI_Flash).
354357

355358
Both filesystem drivers seem to be designed on the assumption that they are

fram/FRAM.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ These are provided by the base class. For the protocol definition see
187187
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
188188
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
189189

190+
These methods exist purely to support the block protocol. They are undocumented:
191+
their use in application code is not recommended.
192+
190193
`readblocks()`
191194
`writeblocks()`
192195
`ioctl()`

fram/FRAM_SPI.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ These are provided by the base class. For the protocol definition see
179179
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
180180
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
181181

182+
These methods exist purely to support the block protocol. They are undocumented:
183+
their use in application code is not recommended.
184+
182185
`readblocks()`
183186
`writeblocks()`
184187
`ioctl()`

spiram/SPIRAM.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ These are provided by the base class. For the protocol definition see
163163
[the pyb documentation](http://docs.micropython.org/en/latest/library/uos.html#uos.AbstractBlockDev)
164164
also [here](http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices).
165165

166+
These methods exist purely to support the block protocol. They are undocumented:
167+
their use in application code is not recommended.
168+
166169
`readblocks()`
167170
`writeblocks()`
168171
`ioctl()`

0 commit comments

Comments
 (0)