Ejemplo n.º 1
0
uint8_t pcb_flash_restore(uint16_t key)
{
    if (key > 0xFFF) {
        return 0x0;
    }
    
    return MMIO8(KPCB_FLASH_BASE_ADDR + key);
}
Ejemplo n.º 2
0
void flash_program_byte(u32 address, u8 data, u32 program_size)
{
	flash_wait_for_last_operation();
	flash_set_program_size(program_size);

	FLASH_CR |= FLASH_PG;

	MMIO8(address) = data;

	flash_wait_for_last_operation();

	FLASH_CR &= ~FLASH_PG;		/* Disable the PG bit. */
}
Ejemplo n.º 3
0
void flash_program_byte(uint32_t address, uint8_t data)
{
	flash_wait_for_last_operation();
	flash_set_program_size(FLASH_CR_PROGRAM_X8);

	FLASH_CR |= FLASH_CR_PG;

	MMIO8(address) = data;

	flash_wait_for_last_operation();

	FLASH_CR &= ~FLASH_CR_PG;		/* Disable the PG bit. */
}