rusefi-1/firmware/util/rfiutil.h

47 lines
831 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/*
* @file rfiutil.h
* @brief Number to string conversion header
*
* @date Nov 15, 2012
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2015-07-10 06:01:56 -07:00
*/
#ifndef RFIUTIL_H_
#define RFIUTIL_H_
#include "global.h"
2016-02-11 14:03:09 -08:00
#if !EFI_UNIT_TEST
2015-07-10 06:01:56 -07:00
#include "histogram.h"
2017-03-23 17:59:14 -07:00
/**
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
#ifndef SIMULATOR
2017-03-22 16:16:45 -07:00
#define isLocked() (ch.dbg.lock_cnt > 0)
#define isIsrContext() (ch.dbg.isr_cnt > 0)
2017-03-23 17:59:14 -07:00
#else
#define isLocked() (0)
#define isIsrContext() (0)
#endif
2015-07-10 06:01:56 -07:00
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
//char hexC(int v);
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par);
#ifdef __cplusplus
}
void printHistogram(Logging *logging, histogram_s *histogram);
#endif /* __cplusplus */
2016-02-11 14:03:09 -08:00
#endif /* EFI_UNIT_TEST */
2015-07-10 06:01:56 -07:00
#endif /* RFIUTIL_H_ */
2016-02-11 14:03:09 -08:00