The function to create cal data now is a wrapper around bladerf_alloc_image() which initializes the returned image with calibration data. The associated CLI command now allows this to be either written to a file or to the device directly. API header cleanup: Pushed the lower level functions to to the end of the header, so the functions people will use more frequently will be at the top of the generated documentation. Also added a missing API_EXPORT and made the Doxygen color scheme a little more blue. (Tired of grayscale ;) ) Windows cleanup: Added get_timestamp() implementation, cleaned up warnings, address some portability issues.
45 lines
786 B
C
45 lines
786 B
C
/**
|
|
* @file minmax.h
|
|
*
|
|
* @brief These static inline routines are preferred over the use of macros,
|
|
* as they provide type safety.
|
|
*/
|
|
|
|
#ifndef MINMAX_H__
|
|
#define MINMAX_H__
|
|
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include "host_config.h"
|
|
|
|
static inline size_t min_sz(size_t x, size_t y)
|
|
{
|
|
return x < y ? x : y;
|
|
}
|
|
|
|
static inline size_t max_sz(size_t x, size_t y)
|
|
{
|
|
return x > y ? x : y;
|
|
}
|
|
|
|
static inline unsigned int uint_min(unsigned int x, unsigned int y)
|
|
{
|
|
return x < y ? x : y;
|
|
}
|
|
|
|
static inline unsigned int uint_max(unsigned int x, unsigned int y)
|
|
{
|
|
return x > y ? x : y;
|
|
}
|
|
|
|
static inline uint32_t u32_min(uint32_t x, uint32_t y)
|
|
{
|
|
return x < y ? x : y;
|
|
}
|
|
|
|
static inline uint32_t u32_max(uint32_t x, uint32_t y)
|
|
{
|
|
return x > y ? x : y;
|
|
}
|
|
|
|
#endif
|