Prusa MINI Firmware overview
st25dv64k.h
Go to the documentation of this file.
1 // st25dv64k.h
2 
3 #ifndef _ST25DV64K_H
4 #define _ST25DV64K_H
5 
6 #include <inttypes.h>
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 extern void st25dv64k_init(void);
13 
14 extern uint8_t st25dv64k_user_read(uint16_t address);
15 
16 extern void st25dv64k_user_write(uint16_t address, uint8_t data);
17 
18 extern void st25dv64k_user_read_bytes(uint16_t address, void *pdata, uint8_t size);
19 
20 extern void st25dv64k_user_write_bytes(uint16_t address, void *pdata, uint8_t size);
21 
22 extern uint8_t st25dv64k_rd_cfg(uint16_t address);
23 
24 extern void st25dv64k_wr_cfg(uint16_t address, uint8_t data);
25 
26 extern void st25dv64k_present_pwd(uint8_t *pwd);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif // _ST25DV64K_H
st25dv64k_user_write
void st25dv64k_user_write(uint16_t address, uint8_t data)
Definition: st25dv64k.c:103
st25dv64k_user_read_bytes
void st25dv64k_user_read_bytes(uint16_t address, void *pdata, uint8_t size)
Definition: st25dv64k.c:111
osSemaphore
#define osSemaphore(name)
Definition: cmsis_os.h:709
osSemaphoreWait
int32_t osSemaphoreWait(osSemaphoreId semaphore_id, uint32_t millisec)
Wait until a Semaphore token becomes available.
Definition: cmsis_os.c:822
ADDR_READ
#define ADDR_READ
Definition: st25dv64k.c:31
BLOCK_DELAY
#define BLOCK_DELAY
Definition: st25dv64k.c:35
st25dv64k_rd_cfg
uint8_t st25dv64k_rd_cfg(uint16_t address)
Definition: st25dv64k.c:140
st25dv64k_init
void st25dv64k_init(void)
Definition: st25dv64k.c:73
DELAY
#define DELAY
Definition: st25dv64k.c:38
data
uint8_t data[8]
Definition: masstorage.h:49
st25dv64k_user_read
uint8_t st25dv64k_user_read(uint16_t address)
Definition: st25dv64k.c:93
st25dv64k_user_write
void st25dv64k_user_write(uint16_t address, uint8_t data)
Definition: st25dv64k.c:103
st25dv64k_wr_cfg
void st25dv64k_wr_cfg(uint16_t address, uint8_t data)
Definition: st25dv64k.c:150
osSemaphoreId
SemaphoreHandle_t osSemaphoreId
Definition: cmsis_os.h:295
osSemaphoreCreate
osSemaphoreId osSemaphoreCreate(const osSemaphoreDef_t *semaphore_def, int32_t count)
Create and Initialize a Semaphore object used for managing resources.
Definition: cmsis_os.c:755
REG_ENDA3
#define REG_ENDA3
Definition: st25dv64k.c:21
osSemaphoreDef
#define osSemaphoreDef(name)
Definition: cmsis_os.h:700
st25dv64k_present_pwd
void st25dv64k_present_pwd(uint8_t *pwd)
Definition: st25dv64k.c:158
auto_build.pwd
pwd
Definition: auto_build.py:78
st25dv64k_unlock
static void st25dv64k_unlock(void)
Definition: st25dv64k.c:57
st25dv64k_user_write_bytes
void st25dv64k_user_write_bytes(uint16_t address, void *pdata, uint8_t size)
Definition: st25dv64k.c:119
REG_ENDA1
#define REG_ENDA1
Definition: st25dv64k.c:17
st25dv64k_sema
osSemaphoreId st25dv64k_sema
Definition: st25dv64k.c:47
st25dv64k_user_write_bytes
void st25dv64k_user_write_bytes(uint16_t address, void *pdata, uint8_t size)
Definition: st25dv64k.c:119
st25dv64k_lock
static void st25dv64k_lock(void)
Definition: st25dv64k.c:49
st25dv64k_init
void st25dv64k_init(void)
Definition: st25dv64k.c:73
osWaitForever
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
ADDR_READ_SYS
#define ADDR_READ_SYS
Definition: st25dv64k.c:33
uint8_t
const uint8_t[]
Definition: 404_html.c:3
address
UsbDeviceAddress address
Definition: address.h:202
HAL_I2C_Master_Transmit
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
st25dv64k_present_pwd
void st25dv64k_present_pwd(uint8_t *pwd)
Definition: st25dv64k.c:158
st25dv64k_initialised
uint8_t st25dv64k_initialised
Definition: st25dv64k.c:42
hi2c1
I2C_HandleTypeDef hi2c1
Definition: main.c:77
BLOCK_BYTES
#define BLOCK_BYTES
Definition: st25dv64k.c:36
st25dv64k_user_read_bytes
void st25dv64k_user_read_bytes(uint16_t address, void *pdata, uint8_t size)
Definition: st25dv64k.c:111
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
st25dv64k_rd_cfg
uint8_t st25dv64k_rd_cfg(uint16_t address)
Definition: st25dv64k.c:140
st25dv64k_wr_cfg
void st25dv64k_wr_cfg(uint16_t address, uint8_t data)
Definition: st25dv64k.c:150
ADDR_WRITE_SYS
#define ADDR_WRITE_SYS
Definition: st25dv64k.c:32
HAL_I2C_Master_Receive
HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
REG_ENDA2
#define REG_ENDA2
Definition: st25dv64k.c:19
HAL_MAX_DELAY
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
st25dv64k_user_read
uint8_t st25dv64k_user_read(uint16_t address)
Definition: st25dv64k.c:93
st25dv64k.h
cmsis_os.h
Header of cmsis_os.c A new set of APIs are added in addition to existing ones, these APIs are specifi...
osSemaphoreRelease
osStatus osSemaphoreRelease(osSemaphoreId semaphore_id)
Release a Semaphore token.
Definition: cmsis_os.c:862
ADDR_WRITE
#define ADDR_WRITE
Definition: st25dv64k.c:30
size
static png_bytep size_t size
Definition: pngwrite.c:2170
I2C_HandleTypeDef
I2C handle Structure definition.
Definition: stm32f4xx_hal_i2c.h:164