mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-26 08:37:16 +00:00
add version macros
This commit is contained in:
parent
eca87e5ee5
commit
bef17fb67f
@ -36,6 +36,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "tusb_option.h"
|
||||||
|
|
||||||
|
#define LATEST_VERSION "00.00"
|
||||||
|
#define LATEST_VERSION_NAME "alpha"
|
||||||
|
|
||||||
void setUp(void)
|
void setUp(void)
|
||||||
{
|
{
|
||||||
@ -45,7 +50,13 @@ void tearDown(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_project_memory()
|
void test_memory_usage(void)
|
||||||
{
|
{
|
||||||
TEST_IGNORE_MESSAGE("Try to keep project total memory usage up-to-date");
|
TEST_IGNORE_MESSAGE("Try to keep project total memory usage up-to-date");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_latest_version(void)
|
||||||
|
{
|
||||||
|
TEST_ASSERT_EQUAL_STRING(LATEST_VERSION, TUSB_VERSION);
|
||||||
|
TEST_ASSERT_EQUAL_STRING(LATEST_VERSION_NAME, TUSB_VERSION_NAME);
|
||||||
|
}
|
||||||
|
@ -62,11 +62,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "compiler/compiler.h"
|
#include "compiler/compiler.h"
|
||||||
#include "tusb_option.h"
|
|
||||||
#include "errors.h"
|
|
||||||
#include "assertion.h"
|
#include "assertion.h"
|
||||||
#include "binary.h"
|
#include "binary.h"
|
||||||
|
#include "errors.h"
|
||||||
|
|
||||||
|
#include "tusb_option.h"
|
||||||
#include "hal/hal.h"
|
#include "hal/hal.h"
|
||||||
#include "core/tusb_types.h"
|
#include "core/tusb_types.h"
|
||||||
#include "core/std_descriptors.h"
|
#include "core/std_descriptors.h"
|
||||||
@ -78,6 +78,8 @@
|
|||||||
#define STATIC_
|
#define STATIC_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define STRING_(x) #x // stringify without expand
|
||||||
|
#define XSTRING_(x) STRING_(x) // expand then stringify
|
||||||
|
|
||||||
/// form an uint32_t from 4 x uint8_t
|
/// form an uint32_t from 4 x uint8_t
|
||||||
static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) ATTR_ALWAYS_INLINE ATTR_CONST;
|
static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) ATTR_ALWAYS_INLINE ATTR_CONST;
|
||||||
|
@ -53,6 +53,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TUSB_VERSION_YEAR 00
|
||||||
|
#define TUSB_VERSION_MONTH 00
|
||||||
|
#define TUSB_VERSION_WEEK 0
|
||||||
|
#define TUSB_VERSION_NAME "alpha"
|
||||||
|
#define TUSB_VERSION XSTRING_(TUSB_VERSION_YEAR) "." XSTRING_(TUSB_VERSION_MONTH)
|
||||||
|
|
||||||
/// define this symbol will make tinyusb look for external configure file
|
/// define this symbol will make tinyusb look for external configure file
|
||||||
#include "tusb_config.h"
|
#include "tusb_config.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user