1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-11 18:39:05 +00:00
trezor-firmware/embed/extmod/modtrezorconfig/norcow.h
2017-11-05 20:46:11 +01:00

35 lines
557 B
C

#ifndef __NORCOW_H__
#define __NORCOW_H__
#include <stdint.h>
#include <stdbool.h>
/*
* Storage parameters:
*/
#define NORCOW_SECTOR_COUNT 2
#define NORCOW_SECTOR_SIZE (64*1024)
/*
* Initialize storage
*/
bool norcow_init(void);
/*
* Wipe the storage
*/
bool norcow_wipe(void);
/*
* Looks for the given key, returns status of the operation
*/
bool norcow_get(uint16_t key, const void **val, uint16_t *len);
/*
* Sets the given key, returns status of the operation
*/
bool norcow_set(uint16_t key, const void *val, uint16_t len);
#endif