/* generate the binary format of the rc5 frame  */
static uint16_t rc5_bin_frame_generation(uint8_t rc5_address, uint8_t rc5_instruction, rc5_ctrl_enum rc5_ctrl)
/* generate the binary format of the rc5 frame  */
static uint16_t rc5_bin_frame_generation(uint8_t rc5_address, uint8_t rc5_instruction, rc5_ctrl_enum rc5_ctrl)
{
    uint16_t star1 = 0x2000;
    uint16_t star2 = 0x1000;
    uint16_t addr = 0;
    while(0x00 == send_operation_completed);
    if(64 <= rc5_instruction){
        star2 = 0;
        rc5_instruction &= 0x003F;
    }
    else{
        star2 = 0x1000;
    }
    send_operation_ready        = 0;
    rc5_frame_manchester_format = 0;
    rc5_frame_binary_format     = 0;
    addr = ((uint16_t)(rc5_address))<<6;
    rc5_frame_binary_format = (star1) | (star2) | (rc5_ctrl) | (addr) | (rc5_instruction);
    return(rc5_frame_binary_format);
}