/* program a half word at the corresponding address  */
fmc_state_enum fmc_halfword_program(uint32_t address, uint16_t data)
/* program a half word at the corresponding address  */
fmc_state_enum fmc_halfword_program(uint32_t address, uint16_t data)
{
    fmc_state_enum fmc_state = fmc_ready_wait(FMC_TIMEOUT_COUNT);
    if(FMC_READY == fmc_state){
        FMC_CTL |= FMC_CTL_PG; 
        REG16(address) = data;
        fmc_state = fmc_ready_wait(FMC_TIMEOUT_COUNT);
        FMC_CTL &= ~FMC_CTL_PG; 
    }
    return fmc_state;
}