示例#1
0
static extension_t identify_start_sequence(uint8_t *buf)
{
    if (1 == validate_bin_nvic(buf)) {
        return BIN;
    }
    else if (1 == validate_hexfile(buf)) {
        return HEX;
    }
    return UNKNOWN;
}
示例#2
0
static bool detect_hex(const uint8_t *data, uint32_t size)
{
    return 1 == validate_hexfile(data);
}