fome-fw/firmware/util/efilib2.h

39 lines
582 B
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/**
* @file efilib2.h
*
* @date Apr 14, 2014
* @author Andrey Belomutskiy, (c) 2012-2014
*/
#ifndef EFILIB2_H_
#define EFILIB2_H_
#include <stdint.h>
2014-11-16 21:03:45 -08:00
typedef struct {
uint64_t highBits;
uint32_t lowBits;
} State64;
void updateAndSet(State64 *state, uint32_t value);
2014-08-29 07:52:33 -07:00
class Overflow64Counter
{
public:
Overflow64Counter();
2014-11-16 21:03:45 -08:00
uint64_t get();
uint64_t update(uint32_t value);
2014-08-29 07:52:33 -07:00
2014-11-16 21:03:45 -08:00
State64 state;
2014-08-29 07:52:33 -07:00
};
2014-11-17 17:03:09 -08:00
#include "main.h"
#if (EFI_PROD_CODE || EFI_SIMULATOR)
#define GET_TIMESTAMP() hal_lld_get_counter_value()
#else
#define GET_TIMESTAMP() 0
#endif
2014-08-29 07:52:33 -07:00
#endif /* EFILIB2_H_ */