Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/firmware_api.c

This file was deleted.

27 changes: 1 addition & 26 deletions src/firmware_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,7 @@
#include <furi_hal_version.h>

// Check if we're building for Momentum firmware
#if defined(FAP_MOMENTUM) && defined(__has_include)
#if __has_include(<momentum/momentum.h>)
#if defined(FW_ORIGIN_Momentum)
#include <momentum/momentum.h>
#define HAS_MOMENTUM_SUPPORT 1
#endif
#endif

// Check for version.h and custom name function
#if defined(__has_include)
#if __has_include(<lib/toolbox/version.h>)
#include <lib/toolbox/version.h>
// Only define if the function prototype exists
#if defined(version_get_custom_name)
#define HAS_VERSION_CUSTOM_NAME 1
#endif
#endif
#endif

/**
* @brief Check if currently running on Momentum firmware
* @return true if running on Momentum firmware
*/
bool is_momentum_firmware(void);

/**
* @brief Check if Momentum features are available
* @return true if Momentum features can be used
*/
bool has_momentum_features(void);
7 changes: 1 addition & 6 deletions src/uart_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,7 @@ UartContext* uart_init(AppState* state) {
}

// Initialize serial with firmware-aware channel selection
FuriHalSerialId uart_channel;
if(has_momentum_features()) {
uart_channel = UART_CH_ESP;
} else {
uart_channel = FuriHalSerialIdUsart;
}
FuriHalSerialId uart_channel = UART_CH_ESP;

uart->serial_handle = furi_hal_serial_control_acquire(uart_channel);
if(uart->serial_handle) {
Expand Down