Subversion Repositories DashDisplay

Rev

Rev 30 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * nvram.c
  3.  *
  4.  *  Created on: 4 Jun 2017
  5.  *      Author: Mike
  6.  */
  7.  
  8. /* Includes ------------------------------------------------------------------*/
  9. #include "stm32l1xx_hal.h"
  10.  
  11.  
  12. #include "nvram.h"
  13.  
  14. void WriteUint16NVRAM(uint32_t Address, uint16_t data)
  15. {
  16.         HAL_FLASHEx_DATAEEPROM_Unlock();
  17.     HAL_FLASHEx_DATAEEPROM_Erase(FLASH_TYPEERASEDATA_HALFWORD,Address);
  18.         HAL_FLASHEx_DATAEEPROM_Program(FLASH_TYPEPROGRAMDATA_HALFWORD,Address,data);
  19.     HAL_FLASHEx_DATAEEPROM_Lock();
  20.  
  21. }
  22.