mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-20 07:25:06 +00:00
Fixes
This commit is contained in:
parent
94d9c1d611
commit
fd45aa6285
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
run: cmake --build build --target build-tests
|
||||
- name: "Run TactilityCore Tests"
|
||||
run: build/Tests/TactilityCore/TactilityCoreTests --exit
|
||||
- name: "Run TactilityFreertos Tests"
|
||||
run: build/Tests/TactilityFreertos/TactilityFreertosTests --exit
|
||||
- name: "Run TactilityFreeRtos Tests"
|
||||
run: build/Tests/TactilityFreeRtos/TactilityFreeRtosTests --exit
|
||||
- name: "Run TactilityHeadless Tests"
|
||||
run: build/Tests/Tactility/TactilityTests --exit
|
||||
|
||||
@ -125,7 +125,7 @@ bool CardputerKeyboard::startLvgl(lv_display_t* display) {
|
||||
keypad->init(7, 8);
|
||||
|
||||
assert(inputTimer == nullptr);
|
||||
inputTimer = std::make_unique<tt::Timer>(tt::Timer::Type::Periodic, [this] {
|
||||
inputTimer = std::make_unique<tt::Timer>(tt::Timer::Type::Periodic, pdMS_TO_TICKS(20), [this] {
|
||||
processKeyboard();
|
||||
});
|
||||
|
||||
@ -135,7 +135,7 @@ bool CardputerKeyboard::startLvgl(lv_display_t* display) {
|
||||
lv_indev_set_display(kbHandle, display);
|
||||
lv_indev_set_user_data(kbHandle, this);
|
||||
|
||||
inputTimer->start(20 / portTICK_PERIOD_MS);
|
||||
inputTimer->start();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
#include <Tactility/Log.h>
|
||||
|
||||
constexpr auto* TAG = "BQ27220";
|
||||
constexpr auto* TAG = "BQ25896";
|
||||
|
||||
void Bq25896::powerOff() {
|
||||
TT_LOG_I(TAG, "Power off");
|
||||
|
||||
@ -13,7 +13,7 @@ Third party projects that were included in Tactility retain their licenses.
|
||||
|
||||
The following projects are also available under [Apache License Version 2.0](Documentation/license-tactilitysdk.md):
|
||||
- TactilityC
|
||||
- TactilityFreertos
|
||||
- TactilityFreeRtos
|
||||
- TactilitySDK (source and binaries)
|
||||
|
||||
# Other licenses & copyrights
|
||||
|
||||
@ -87,12 +87,12 @@ public:
|
||||
*outError = Error::Resource;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
if (outFlags != nullptr) {
|
||||
*outFlags = result;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (outFlags != nullptr) {
|
||||
*outFlags = result;
|
||||
}
|
||||
portYIELD_FROM_ISR(pdTRUE);
|
||||
return true;
|
||||
} else {
|
||||
auto result = xEventGroupClearBits(handle.get(), flags);
|
||||
if (outFlags != nullptr) {
|
||||
|
||||
@ -47,7 +47,7 @@ private:
|
||||
|
||||
static constexpr auto TAG = "Thread";
|
||||
|
||||
static_assert(static_cast<UBaseType_t>(Priority::Critical) <= configMAX_PRIORITIES, "Highest thread priority is higher than max priority");
|
||||
static_assert(static_cast<UBaseType_t>(Priority::Critical) < configMAX_PRIORITIES, "Highest thread priority is higher than max priority");
|
||||
|
||||
static void mainBody(void* context) {
|
||||
assert(context != nullptr);
|
||||
@ -112,7 +112,7 @@ public:
|
||||
affinity(affinity)
|
||||
{}
|
||||
|
||||
/** @warning If thread is running, you mjust call join() first */
|
||||
/** @warning If thread is running, you just call join() first */
|
||||
~Thread() {
|
||||
assert(state == State::Stopped);
|
||||
assert(taskHandle == nullptr);
|
||||
|
||||
@ -24,7 +24,7 @@ constexpr uint32_t getTickFrequency() {
|
||||
}
|
||||
|
||||
/** @return the amount of ticks that has passed in the main kernel task */
|
||||
constexpr TickType_t getTicks() {
|
||||
inline TickType_t getTicks() {
|
||||
if (xPortInIsrContext() == pdTRUE) {
|
||||
return xTaskGetTickCountFromISR();
|
||||
} else {
|
||||
@ -34,12 +34,12 @@ constexpr TickType_t getTicks() {
|
||||
|
||||
|
||||
/** @return the amount of milliseconds that has passed in the main kernel tasks */
|
||||
constexpr size_t getMillis() {
|
||||
inline size_t getMillis() {
|
||||
return getTicks() * portTICK_PERIOD_MS;
|
||||
}
|
||||
|
||||
/** @return the microseconds that have passed since boot */
|
||||
constexpr int64_t getMicrosSinceBoot() {
|
||||
inline int64_t getMicrosSinceBoot() {
|
||||
#ifdef ESP_PLATFORM
|
||||
return esp_timer_get_time();
|
||||
#else
|
||||
@ -50,12 +50,12 @@ constexpr int64_t getMicrosSinceBoot() {
|
||||
}
|
||||
|
||||
/** Convert seconds to ticks */
|
||||
constexpr TickType_t secondsToTicks(uint32_t seconds) {
|
||||
return static_cast<TickType_t>(seconds) * 1000U / portTICK_PERIOD_MS;
|
||||
inline TickType_t secondsToTicks(uint32_t seconds) {
|
||||
return static_cast<uint64_t>(seconds) * 1000U / portTICK_PERIOD_MS;
|
||||
}
|
||||
|
||||
/** Convert milliseconds to ticks */
|
||||
constexpr TickType_t millisToTicks(uint32_t milliSeconds) {
|
||||
inline TickType_t millisToTicks(uint32_t milliSeconds) {
|
||||
#if configTICK_RATE_HZ == 1000
|
||||
return static_cast<TickType_t>(milliSeconds);
|
||||
#else
|
||||
@ -67,7 +67,7 @@ constexpr TickType_t millisToTicks(uint32_t milliSeconds) {
|
||||
* Delay the current task for the specified amount of ticks
|
||||
* @warning Does not work in ISR context
|
||||
*/
|
||||
constexpr void delayTicks(TickType_t ticks) {
|
||||
inline void delayTicks(TickType_t ticks) {
|
||||
assert(xPortInIsrContext() == pdFALSE);
|
||||
if (ticks == 0U) {
|
||||
taskYIELD();
|
||||
@ -80,7 +80,7 @@ constexpr void delayTicks(TickType_t ticks) {
|
||||
* Delay the current task for the specified amount of milliseconds
|
||||
* @warning Does not work in ISR context
|
||||
*/
|
||||
constexpr void delayMillis(uint32_t milliSeconds) {
|
||||
inline void delayMillis(uint32_t milliSeconds) {
|
||||
delayTicks(millisToTicks(milliSeconds));
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ constexpr void delayMillis(uint32_t milliSeconds) {
|
||||
* Stall the currently active CPU core for the specified amount of microseconds.
|
||||
* This does not allow other tasks to run on the stalled CPU core.
|
||||
*/
|
||||
constexpr void delayMicros(uint32_t microseconds) {
|
||||
inline void delayMicros(uint32_t microseconds) {
|
||||
#ifdef ESP_PLATFORM
|
||||
ets_delay_us(microseconds);
|
||||
#else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user