add doc commit
This commit is contained in:
parent
75afc7d97d
commit
3447d0f1c0
1 changed files with 21 additions and 0 deletions
|
@ -16,17 +16,38 @@ int app_main() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function: getmac
|
||||||
|
* ----------------------
|
||||||
|
* Changes the pointer to the devices mac address
|
||||||
|
*
|
||||||
|
* *buf: The pointer to set the mac address at
|
||||||
|
*/
|
||||||
void getmac(uint8_t *buf) {
|
void getmac(uint8_t *buf) {
|
||||||
// Get MAC address of the WiFi station interface
|
// Get MAC address of the WiFi station interface
|
||||||
esp_read_mac(buf, ESP_MAC_WIFI_STA);
|
esp_read_mac(buf, ESP_MAC_WIFI_STA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function: getUpTime
|
||||||
|
* ----------------------
|
||||||
|
* Calculates the current uptime of the device
|
||||||
|
*
|
||||||
|
* returns: The current uptime of the device in int
|
||||||
|
*/
|
||||||
int getUpTime() {
|
int getUpTime() {
|
||||||
// Get system uptime in milliseconds
|
// Get system uptime in milliseconds
|
||||||
int uptime = (xTaskGetTickCount() * (1000 / configTICK_RATE_HZ));
|
int uptime = (xTaskGetTickCount() * (1000 / configTICK_RATE_HZ));
|
||||||
return uptime;
|
return uptime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function: getTemp
|
||||||
|
* ----------------------
|
||||||
|
* Get the current temprature of the attaches sensor
|
||||||
|
*
|
||||||
|
* returns: The current temprature of the sensor
|
||||||
|
*/
|
||||||
float getTemp() {
|
float getTemp() {
|
||||||
float temp = 0.0;
|
float temp = 0.0;
|
||||||
ds18b20_handler_t sensor;
|
ds18b20_handler_t sensor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue