Create time module stub
This commit is contained in:
parent
95cf84728d
commit
81f5c6aaa0
5
components/time/CMakeLists.txt
Normal file
5
components/time/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
idf_component_register(
|
||||||
|
SRCS "time.c"
|
||||||
|
INCLUDE_DIRS "."
|
||||||
|
REQUIRES
|
||||||
|
)
|
15
components/time/time.c
Normal file
15
components/time/time.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
* Copyright (c) Camden Dixie O'Brien
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "time.h"
|
||||||
|
|
||||||
|
void time_init(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Time time_get(void)
|
||||||
|
{
|
||||||
|
return (Time){ .hour = 13, .minute = 37 };
|
||||||
|
}
|
24
components/time/time.h
Normal file
24
components/time/time.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
* Copyright (c) Camden Dixie O'Brien
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TIME_H
|
||||||
|
#define TIME_H
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned hour;
|
||||||
|
unsigned minute;
|
||||||
|
} Time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the time module.
|
||||||
|
*/
|
||||||
|
void time_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current time.
|
||||||
|
*/
|
||||||
|
Time time_get(void);
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user