-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Basic) support for Flow3r Badge (c3camp 2023) (#368)
- Loading branch information
Showing
82 changed files
with
1,353 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# This file is similar to the mkdocs.nav configuration option, but it will be mounted under mkdocs.nav.Firmware only! | ||
|
||
- 'OSW-OS': | ||
- firmware/getting_started.md | ||
- firmware/osw_os.md | ||
- firmware/troubleshooting.md | ||
- 'Applications': | ||
- 'Watchfaces': 'firmware/apps/watchfaces.md' | ||
- 'Tools': 'firmware/apps/tools.md' | ||
- 'Games': 'firmware/apps/games.md' | ||
- 'OSW Weather': 'firmware/apps/OswWeather.md' | ||
- "OSW-OS": | ||
- firmware/getting_started.md | ||
- firmware/flags.md | ||
- firmware/troubleshooting.md | ||
- firmware/support.md | ||
- "Applications": | ||
- "Watchfaces": "firmware/apps/watchfaces.md" | ||
- "Tools": "firmware/apps/tools.md" | ||
- "Games": "firmware/apps/games.md" | ||
- "OSW Weather": "firmware/apps/OswWeather.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Hardware Support | ||
Over time, the operating system gained additional hardware support for non open-smartwatch environments. This page lists the supported hardware and how to use it (as well as unwanted features, so called "bugs"). You can also find all these configurations inside the `platformio.ini` file. | ||
|
||
## Official Hardware | ||
...based on hardware schematics released by the OSW team and tested frequently. | ||
|
||
| Hardware | Status | Reference | | ||
| -------------------------------------- | ------------ | --------------------------------------------------------- | | ||
| `LIGHT_EDITION_V3_3` | Maintained | See "Hardware"-Documentation section | | ||
| `EXPERIMENTAL_LIGHT_EDITION_V4_0` | Experimental | See "Hardware"-Documentation section | | ||
| `EXPERIMENTAL_LIGHT_EDITION_V3_3_LUA` | Experimental | Same as `LIGHT_EDITION_V3_3`, but with LUA-script-support | | ||
| `EXPERIMENTAL_GPS_EDITION_V3_1` | Experimental | See "Hardware"-Documentation section | | ||
| `EXPERIMENTAL_GPS_EDITION_DEV_ROTATED` | Experimental | See "Hardware"-Documentation section | | ||
|
||
## 3rd Party Hardware | ||
|
||
| Hardware | Status | Reference | Known Issues | | ||
| ------------------------------ | ------------ | --------------------------------- | ----------------------------------------------------------------------- | | ||
| `3RD_PARTY_FLOW3R_C3CAMP_2023` | Experimental | [website](https://flow3r.garden/) | [PR368](https://github.com/Open-Smartwatch/open-smartwatch-os/pull/368) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <WString.h> | ||
#include OSW_TARGET_PLATFORM_HEADER | ||
|
||
#if OSW_PLATFORM_HARDWARE_ESP32_USE_JTAG_SERIAL == 1 | ||
#include <esp32s3/rom/uart.h> // change this if needed, as this is specifically ESP32s2 | ||
#include <esp_rom_caps.h> | ||
#include <esp_rom_uart.h> | ||
#else | ||
#include <HardwareSerial.h> | ||
#endif | ||
|
||
/** | ||
* @brief This class is not the fastest (only one byte at a time), but it is the most compatible | ||
* | ||
*/ | ||
class OswSerial { | ||
public: | ||
/** | ||
* @brief Start / initialize serial communication (not all platforms may respect the baud rate) | ||
* | ||
* @param baud | ||
*/ | ||
void begin(unsigned long baud); | ||
|
||
/** | ||
* @brief Put one byte to the serial port (potentially buffered) | ||
* | ||
* If you only want to print a single character, prefer this method over print() | ||
* | ||
* @param c | ||
*/ | ||
void putc(uint8_t c); | ||
|
||
/** | ||
* @brief FLush out the outgoing buffer, if buffered | ||
* | ||
*/ | ||
void flush(); | ||
|
||
/** | ||
* @brief Get one byte from the serial port | ||
* | ||
* @param c where to store the byte | ||
* @return true if a byte was read | ||
* @return false if no byte was read | ||
*/ | ||
bool getc(uint8_t& c); | ||
|
||
/** | ||
* @brief Print a string to the serial port and flush it | ||
* | ||
* @tparam T | ||
* @param t | ||
*/ | ||
template<typename T> | ||
void print(T t) { | ||
#if OSW_PLATFORM_HARDWARE_ESP32_USE_JTAG_SERIAL == 1 | ||
for(auto& c : String(t)) { | ||
this->putc(c); | ||
} | ||
this->flush(); | ||
#else | ||
Serial.print(t); | ||
#endif | ||
} | ||
|
||
/** | ||
* @brief Print a string to the serial port and flush it | ||
* | ||
* @tparam T | ||
* @param t | ||
*/ | ||
template<typename T> | ||
void println(T t) { | ||
this->print(t); | ||
this->println(); | ||
} | ||
|
||
/** | ||
* @brief Print a newline to the serial port and flush it | ||
* | ||
*/ | ||
void println(); | ||
|
||
static OswSerial* getInstance(); | ||
static void resetInstance(); | ||
private: | ||
static OswSerial* instance; | ||
}; |
Oops, something went wrong.