Skip to content

Commit

Permalink
add missing example comments for do_nvmctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
WestfW committed Sep 30, 2020
1 parent 13b1e70 commit c4ad0a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions optiboot/bootloaders/optiboot/optiboot_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ void watchdogConfig (uint8_t x) {


#ifndef APP_NOSPM

/*
* Separate function for doing nvmctrl stuff.
* It's needed for application to do manipulate flash, since only the
Expand All @@ -620,7 +619,10 @@ void watchdogConfig (uint8_t x) {
* - wait for NVM to complete
*
* For example, to write a flash page:
*
* Copy each byte with
* do_nvmctrl(flashOffset+MAPPED_PROGMEM_START, 0xFF, *inputPtr);
* Erase and write page with
* do_nvmctrl(0, NVMCTRL_CMD_PAGEERASEWRITE_gc, 0);
*/
static void do_nvmctrl(uint16_t address, uint8_t command, uint8_t data) __attribute__ ((used));
static void do_nvmctrl (uint16_t address, uint8_t command, uint8_t data) {
Expand Down

0 comments on commit c4ad0a8

Please sign in to comment.