Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
This commit is contained in:
committed by
GitHub
parent
7856827ecf
commit
c87200a80d
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
namespace tt {
|
||||
|
||||
void initEsp();
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // ESP_PLATFORM
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
namespace tt {
|
||||
|
||||
esp_err_t initPartitionsEsp();
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // ESP_PLATFORM
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "Tactility/hal/Configuration.h"
|
||||
|
||||
namespace tt::hal {
|
||||
|
||||
void init(const Configuration& configuration);
|
||||
|
||||
} // namespace
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
bool tusbIsSupported();
|
||||
bool tusbStartMassStorageWithSdmmc();
|
||||
void tusbStop();
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace tt::network::ntp {
|
||||
|
||||
void init();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "Tactility/service/ServiceContext.h"
|
||||
#include "Tactility/service/Service.h"
|
||||
|
||||
namespace tt::service {
|
||||
|
||||
class ServiceInstance : public ServiceContext {
|
||||
|
||||
private:
|
||||
|
||||
Mutex mutex = Mutex(Mutex::Type::Normal);
|
||||
std::shared_ptr<const ServiceManifest> manifest;
|
||||
std::shared_ptr<Service> service;
|
||||
|
||||
public:
|
||||
|
||||
explicit ServiceInstance(std::shared_ptr<const service::ServiceManifest> manifest);
|
||||
~ServiceInstance() override = default;
|
||||
|
||||
/** @return a reference ot the service's manifest */
|
||||
const service::ServiceManifest& getManifest() const override;
|
||||
|
||||
/** Retrieve the paths that are relevant to this service */
|
||||
std::unique_ptr<Paths> getPaths() const override;
|
||||
|
||||
std::shared_ptr<Service> getService() const { return service; }
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Tactility/service/ServiceInstance.h"
|
||||
|
||||
namespace tt::service {
|
||||
|
||||
class ServiceInstancePaths final : public Paths {
|
||||
|
||||
private:
|
||||
|
||||
std::shared_ptr<const ServiceManifest> manifest;
|
||||
|
||||
public:
|
||||
|
||||
explicit ServiceInstancePaths(std::shared_ptr<const ServiceManifest> manifest) : manifest(std::move(manifest)) {}
|
||||
~ServiceInstancePaths() final = default;
|
||||
|
||||
std::string getDataDirectory() const final;
|
||||
std::string getDataDirectoryLvgl() const final;
|
||||
std::string getDataPath(const std::string& childPath) const final;
|
||||
std::string getDataPathLvgl(const std::string& childPath) const final;
|
||||
std::string getSystemDirectory() const final;
|
||||
std::string getSystemDirectoryLvgl() const final;
|
||||
std::string getSystemPath(const std::string& childPath) const final;
|
||||
std::string getSystemPathLvgl(const std::string& childPath) const final;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace tt::time {
|
||||
|
||||
void init();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user