Prusa MINI Firmware overview
|
#include "st25dv64k.h"
#include <string.h>
#include "cmsis_os.h"
#include "stm32f4xx_hal.h"
◆ ST25DV64K_RTOS
◆ REG_GPO
◆ REG_IT_TIME
#define REG_IT_TIME 0x0001 |
◆ REG_EH_MODE
#define REG_EH_MODE 0x0002 |
◆ REG_RF_MNGT
#define REG_RF_MNGT 0x0003 |
◆ REG_RFA1SS
#define REG_RFA1SS 0x0004 |
◆ REG_ENDA1
◆ REG_RFA2SS
#define REG_RFA2SS 0x0006 |
◆ REG_ENDA2
◆ REG_RFA3SS
#define REG_RFA3SS 0x0008 |
◆ REG_ENDA3
◆ REG_RFA4SS
#define REG_RFA4SS 0x000A |
◆ REG_I2CSS
◆ REG_LOCK_CCFILE
#define REG_LOCK_CCFILE 0x000C |
◆ REG_MB_MODE
#define REG_MB_MODE 0x000D |
◆ REG_MB_WDG
#define REG_MB_WDG 0x000E |
◆ REG_LOCK_CFG
#define REG_LOCK_CFG 0x000F |
◆ ADDR_WRITE
◆ ADDR_READ
◆ ADDR_WRITE_SYS
#define ADDR_WRITE_SYS 0xAE |
◆ ADDR_READ_SYS
#define ADDR_READ_SYS 0xAF |
◆ BLOCK_DELAY
◆ BLOCK_BYTES
◆ DELAY
◆ st25dv64k_delay
◆ st25dv64k_lock()
◆ st25dv64k_unlock()
◆ st25dv64k_init()
74 uint8_t pwd[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
◆ st25dv64k_user_read()
uint8_t st25dv64k_user_read |
( |
uint16_t |
address | ) |
|
◆ st25dv64k_user_write()
void st25dv64k_user_write |
( |
uint16_t |
address, |
|
|
uint8_t |
data |
|
) |
| |
◆ st25dv64k_user_read_bytes()
void st25dv64k_user_read_bytes |
( |
uint16_t |
address, |
|
|
void * |
pdata, |
|
|
uint8_t |
size |
|
) |
| |
◆ st25dv64k_user_write_bytes()
void st25dv64k_user_write_bytes |
( |
uint16_t |
address, |
|
|
void * |
pdata, |
|
|
uint8_t |
size |
|
) |
| |
126 if (block_size >
size)
130 memcpy(_out + 2, p, block_size);
◆ st25dv64k_rd_cfg()
uint8_t st25dv64k_rd_cfg |
( |
uint16_t |
address | ) |
|
◆ st25dv64k_wr_cfg()
void st25dv64k_wr_cfg |
( |
uint16_t |
address, |
|
|
uint8_t |
data |
|
) |
| |
◆ st25dv64k_present_pwd()
159 uint8_t _out[19] = { 0x09, 0x00, 0, 0, 0, 0, 0, 0, 0, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0 };
161 memcpy(_out + 2,
pwd, 8);
162 memcpy(_out + 11,
pwd, 8);
◆ hi2c1
◆ st25dv64k_initialised
◆ st25dv64k_sema
#define osSemaphore(name)
Definition: cmsis_os.h:709
int32_t osSemaphoreWait(osSemaphoreId semaphore_id, uint32_t millisec)
Wait until a Semaphore token becomes available.
Definition: cmsis_os.c:822
#define ADDR_READ
Definition: st25dv64k.c:31
#define BLOCK_DELAY
Definition: st25dv64k.c:35
uint8_t st25dv64k_rd_cfg(uint16_t address)
Definition: st25dv64k.c:140
#define DELAY
Definition: st25dv64k.c:38
uint8_t data[8]
Definition: masstorage.h:49
void st25dv64k_wr_cfg(uint16_t address, uint8_t data)
Definition: st25dv64k.c:150
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
#define REG_ENDA3
Definition: st25dv64k.c:21
#define osSemaphoreDef(name)
Definition: cmsis_os.h:700
void st25dv64k_present_pwd(uint8_t *pwd)
Definition: st25dv64k.c:158
pwd
Definition: auto_build.py:78
static void st25dv64k_unlock(void)
Definition: st25dv64k.c:57
#define REG_ENDA1
Definition: st25dv64k.c:17
osSemaphoreId st25dv64k_sema
Definition: st25dv64k.c:47
static void st25dv64k_lock(void)
Definition: st25dv64k.c:49
#define osWaitForever
wait forever timeout value
Definition: cmsis_os.h:230
#define ADDR_READ_SYS
Definition: st25dv64k.c:33
const uint8_t[]
Definition: 404_html.c:3
UsbDeviceAddress address
Definition: address.h:202
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
uint8_t st25dv64k_initialised
Definition: st25dv64k.c:42
I2C_HandleTypeDef hi2c1
Definition: main.c:77
#define BLOCK_BYTES
Definition: st25dv64k.c:36
#define ADDR_WRITE_SYS
Definition: st25dv64k.c:32
HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout)
#define REG_ENDA2
Definition: st25dv64k.c:19
#define HAL_MAX_DELAY
Definition: stm32f4xx_hal_def.h:76
osStatus osSemaphoreRelease(osSemaphoreId semaphore_id)
Release a Semaphore token.
Definition: cmsis_os.c:862
#define ADDR_WRITE
Definition: st25dv64k.c:30
static png_bytep size_t size
Definition: pngwrite.c:2170