chore: import local project into Gitea
This commit is contained in:
46
lib/README
Normal file
46
lib/README
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
This directory is intended for project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link into the executable file.
|
||||
|
||||
The source code of each library should be placed in a separate directory
|
||||
("lib/your_library_name/[Code]").
|
||||
|
||||
For example, see the structure of the following example libraries `Foo` and `Bar`:
|
||||
|
||||
|--lib
|
||||
| |
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
|
||||
| |
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |
|
||||
| |- README --> THIS FILE
|
||||
|
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Example contents of `src/main.c` using Foo and Bar:
|
||||
```
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The PlatformIO Library Dependency Finder will find automatically dependent
|
||||
libraries by scanning project source files.
|
||||
|
||||
More information about PlatformIO Library Dependency Finder
|
||||
- https://docs.platformio.org/page/librarymanager/ldf.html
|
||||
3
lib/esp-hosted-fg/CMakeLists.txt
Normal file
3
lib/esp-hosted-fg/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
idf_component_register(SRCS "esp_hosted_fg.c"
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES esp_wifi)
|
||||
27
lib/esp-hosted-fg/esp_hosted_fg.c
Normal file
27
lib/esp-hosted-fg/esp_hosted_fg.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "esp_hosted_fg.h"
|
||||
#include <esp_log.h>
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
static const char *TAG = "ESP_HOSTED_FG";
|
||||
|
||||
esp_err_t esp_hosted_fg_init(void) {
|
||||
ESP_LOGI(TAG, "Initializing ESP-Hosted-FG component");
|
||||
// This is a mock implementation.
|
||||
// In a real scenario, this would initialize communication
|
||||
// with the ESP32-C6.
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_hosted_fg_wifi_ap_start(void) {
|
||||
ESP_LOGI(TAG, "Starting Wi-Fi AP using ESP-Hosted-FG");
|
||||
|
||||
// This is a mock implementation.
|
||||
// A real implementation would configure and start the AP on the ESP32-C6.
|
||||
|
||||
// Since we can't control the C6, we'll just log and return success.
|
||||
ESP_LOGW(TAG, "Mock AP start. No actual AP will be created.");
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
17
lib/esp-hosted-fg/esp_hosted_fg.h
Normal file
17
lib/esp-hosted-fg/esp_hosted_fg.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef ESP_HOSTED_FG_H
|
||||
#define ESP_HOSTED_FG_H
|
||||
|
||||
#include <esp_err.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
esp_err_t esp_hosted_fg_init(void);
|
||||
esp_err_t esp_hosted_fg_wifi_ap_start(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ESP_HOSTED_FG_H
|
||||
Reference in New Issue
Block a user