Create time module stub

This commit is contained in:
Camden Dixie O'Brien 2023-05-15 16:42:55 +01:00
parent 95cf84728d
commit 81f5c6aaa0
3 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,5 @@
idf_component_register(
SRCS "time.c"
INCLUDE_DIRS "."
REQUIRES
)

15
components/time/time.c Normal file
View 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
View 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