/* Programs a half word at a specified address.  */
FLASH_Status FLASH_ProgramHalfWord(u32 address, u16 data)
/* Programs a half word at a specified address.  */
FLASH_Status FLASH_ProgramHalfWord(u32 address, u16 data)
{
    FLASH->CR |= FLASH_CR_PG;
    *(vu16*)address = data;
    return FLASH_WaitForLastOperation(ProgramTimeout);
}