osmo-e1-hardware/firmware/ice40-riscv/common/utils.h

17 lines
367 B
C

/*
* utils.h
*
* Copyright (C) 2019-2020 Sylvain Munaut <tnt@246tNt.com>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
#pragma once
#include <stdbool.h>
char *hexstr(void *d, int n, bool space);
uint8_t hexval(char c);
void _panic(const char *file, int lineno, const char *fmt, ...);
#define panic(fmt, ...) _panic(__FILE__, __LINE__, fmt, ##__VA_ARGS__)