Changeset 607:601e333511eb
- Timestamp:
- 06/12/08 13:00:59 (7 months ago)
- Author:
- Maxime Petazzoni <maxime.petazzoni@…>
- Branch:
- default
- Message:
-
Add a nxefc_erase_page() function to ease page wipping.
- Location:
- nxos/base/drivers
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r551
|
r607
|
|
| | 1 | /* Copyright (c) 2008 the NxOS developers |
| | 2 | * |
| | 3 | * See AUTHORS for a full list of the developers. |
| | 4 | * |
| | 5 | * Redistribution of this file is permitted under |
| | 6 | * the terms of the GNU Public License (GPL) version 2. |
| | 7 | */ |
| | 8 | |
| 1 | 9 | /* Driver for the NXT Embedded Flash Controller. |
| 2 | 10 | */ |
| … |
… |
|
| 69 | 77 | } |
| 70 | 78 | |
| | 79 | bool nx__efc_erase_page(U32 page, U32 value) { |
| | 80 | U32 data[EFC_PAGE_WORDS] = {value}; |
| | 81 | return nx__efc_write_page(data, page); |
| | 82 | } |
| | 83 | |
| 71 | 84 | /* TODO: implement other flash operations? */ |
| 72 | 85 | |
-
|
r551
|
r607
|
|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | | /* Copyright (C) 2008 the NxOS developers |
| | 7 | /* Copyright (c) 2008 the NxOS developers |
| 8 | 8 | * |
| 9 | 9 | * See AUTHORS for a full list of the developers. |
| … |
… |
|
| 80 | 80 | void nx__efc_read_page(U32 page, U32 *data); |
| 81 | 81 | |
| | 82 | /** Erase a page to the given value. |
| | 83 | * |
| | 84 | * @param page The page number in tho flash memory. |
| | 85 | * @param value The value to set on the page (repeated EFC_PAGE_WORDS |
| | 86 | * times). |
| | 87 | */ |
| | 88 | bool nx__efc_erase_page(U32 page, U32 value); |
| | 89 | |
| 82 | 90 | /*@}*/ |
| 83 | 91 | /*@}*/ |