Air quality sensor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
esp-airsensor/components/fileserver/src/embedded_files.c

23 lines
646 B

#include <esp_err.h>
#include "fileserver/embedded_files.h"
#include "string.h"
esp_err_t __attribute__((weak))
www_get_static_file(const char *name, enum file_access_level access, const struct embedded_file_info **file)
{
// simple search by name
for(int i = 0; i < EMBEDDED_FILE_LOOKUP_LEN; i++) {
if (0 == strcmp(EMBEDDED_FILE_LOOKUP[i].name, name)) {
*file = &EMBEDDED_FILE_LOOKUP[i];
return ESP_OK;
}
}
return ESP_ERR_NOT_FOUND;
}
bool __attribute__((weak))
www_get_static_file_access_check(const struct embedded_file_info *file, enum file_access_level access) {
return true;
}