Skip to content

Commit 97a97c7

Browse files
de-nordicaescolar
authored andcommitted
drivers/flash: Fix typos and incorrect description
Fixing typos. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 33f8039 commit 97a97c7

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

drivers/flash/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config FLASH_HAS_EX_OP
2020
config FLASH_HAS_EXPLICIT_ERASE
2121
bool
2222
help
23-
Device has does not do erase-on-write (erase-on-program, auto-erase
23+
Device does not do erase-on-write (erase-on-program, auto-erase
2424
on write) and requires explicit erase procedure to be programmed
2525
with random value, in place where it has already been programmed with
2626
some other value, as program can only change bits from erased-value
@@ -128,7 +128,7 @@ config FLASH_SHELL_BUFFER_SIZE
128128
endif # FLASH_SHELL
129129

130130
config FLASH_FILL_BUFFER_SIZE
131-
int "Buffer size of flash_fill funciton"
131+
int "Buffer size of flash_fill function"
132132
default 32
133133
help
134134
Size of a buffer used by flash_fill function to fill a device with
@@ -138,7 +138,7 @@ config FLASH_FILL_BUFFER_SIZE
138138
be written to a device, and alignment of write offset.
139139
Even if device does not have such requirement, filling device by
140140
single bytes is not efficient.
141-
Value selected here should be multiply of the largest write-block-size
141+
Value selected here should be a multiple of the largest write-block-size
142142
among all the memory devices used in system.
143143

144144
if FLASH_HAS_PAGE_LAYOUT

include/zephyr/drivers/flash.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ struct flash_pages_layout {
5757
* through a runtime.
5858
*/
5959
struct flash_parameters {
60+
/** Minimal write alignment and size */
6061
const size_t write_block_size;
61-
/* Device capabilities. Only drivers are supposed to set the
62-
* capabilities directly, users need to call the FLASH_CAPS_
63-
* macros on pointer to flash_parameters to get capabilities.
62+
63+
/** @cond INTERNAL_HIDDEN */
64+
/* User code should call flash_params_get_ functions on flash_parameters
65+
* to get capabilities, rather than accessing object contents directly.
6466
*/
6567
struct {
6668
/* Device has no explicit erase, so it either erases on
@@ -70,7 +72,9 @@ struct flash_parameters {
7072
*/
7173
bool no_explicit_erase: 1;
7274
} caps;
73-
uint8_t erase_value; /* Byte value of erased flash */
75+
/** @endcond */
76+
/** Value the device is filled in erased areas */
77+
uint8_t erase_value;
7478
};
7579

7680
/** Set for ordinary Flash where erase is needed before write of random data */
@@ -324,7 +328,7 @@ __syscall int flash_fill(const struct device *dev, uint8_t val, off_t offset, si
324328
* If device is explicit erase type device or device driver provides erase
325329
* callback, the callback of the device is called, in which it behaves
326330
* the same way as flash_erase.
327-
* If a device is does not require explicit erase, either because
331+
* If a device does not require explicit erase, either because
328332
* it has no erase at all or has auto-erase/erase-on-write,
329333
* and does not provide erase callback then erase is emulated by
330334
* leveling selected device memory area with erase_value assigned to

0 commit comments

Comments
 (0)