KETCube
Functions
ketCube_eeprom.c File Reference

This file contains the ketCube EEPROM driver. More...

#include "stdint.h"
#include "ketCube_eeprom.h"
#include "stm32l0xx_hal.h"
#include "ketCube_terminal.h"
#include "vcom.h"

Functions

ketCube_EEPROM_Error_t EEPROM_Unlock (void)
 Unlock the EEPROM. More...
 
ketCube_EEPROM_Error_t EEPROM_Lock (void)
 Lock the EEPROM. More...
 
ketCube_EEPROM_Error_t EEPROM_Write (uint32_t addr, uint8_t data)
 Write the EEPROM word. More...
 
ketCube_EEPROM_Error_t EEPROM_Read (uint32_t addr, uint8_t *data)
 Read the EEPROM word. More...
 
ketCube_EEPROM_Error_t ketCube_EEPROM_Erase (uint32_t addr, uint8_t len)
 Erase block of the EEPROM memory. More...
 
ketCube_EEPROM_Error_t ketCube_EEPROM_WriteBuffer (uint32_t addr, uint8_t *data, uint8_t len)
 Write Buffer to the EEPROM. More...
 
ketCube_EEPROM_Error_t ketCube_EEPROM_ReadBuffer (uint32_t addr, uint8_t *data, uint8_t len)
 Read Buffer to the EEPROM. More...
 

Detailed Description

This file contains the ketCube EEPROM driver.

Author
Jan Belohoubek
Version
0.1
Date
2018-01-05
Attention

© Copyright (c) 2018 University of West Bohemia in Pilsen All rights reserved.

Developed by: The SmartCampus Team Department of Technologies and Measurement www.smartcampus.cz | www.zcu.cz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

Function Documentation

◆ EEPROM_Lock()

ketCube_EEPROM_Error_t EEPROM_Lock ( void  )

Lock the EEPROM.

Return values
errorcode, KETCUBE_EEPROM_OK if success

◆ EEPROM_Read()

ketCube_EEPROM_Error_t EEPROM_Read ( uint32_t  addr,
uint8_t *  data 
)

Read the EEPROM word.

Parameters
addrEEPROM offset (from the base address)
datato data to read
Return values
KETCUBE_EEPROM_OKif success
KETCUBE_EEPROM_ERROR_MEMOVERif address out of memory

◆ EEPROM_Unlock()

ketCube_EEPROM_Error_t EEPROM_Unlock ( void  )

Unlock the EEPROM.

Return values
errorcode, KETCUBE_EEPROM_OK if success

◆ EEPROM_Write()

ketCube_EEPROM_Error_t EEPROM_Write ( uint32_t  addr,
uint8_t  data 
)

Write the EEPROM word.

Parameters
addrEEPROM offset (from the base address)
databuffer to be written
Return values
errorcode, KETCUBE_EEPROM_OK if success