FuriHal: replace HAL with LL in RFID Part 1. Drop F6. (#1049)
* FuriHal: new speaker HAL * FuriHal: drop PWM * FuriHal: move COMP1 to LL * FuriHal: move COMP1 to LL backport to F6 * FuriHal: remove missing gpio_rfid_carrier from F6 * FurHal: use LL for system controls in flash HAL * Drop F6 source tree * Drop F6 from GitHub workflow * Tie USE_FULL_ASSERT with APP_UNIT_TESTS * Speaker: return to old volume calculation * FreeRTOS: move TCB header to glue Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
#include <callback-connector.h>
|
||||
#include <maxim_crc.h>
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
KeyReader::Error KeyReader::read(iButtonKey* key) {
|
||||
uint8_t tmp_key_data[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
iButtonKeyType key_type;
|
||||
@@ -116,9 +114,9 @@ void KeyReader::start_comaparator(void) {
|
||||
|
||||
comparator_callback_pointer =
|
||||
cbc::obtain_connector(this, &KeyReader::comparator_trigger_callback);
|
||||
api_interrupt_add(comparator_callback_pointer, InterruptTypeComparatorTrigger, this);
|
||||
furi_hal_rfid_comp_set_callback(comparator_callback_pointer, this);
|
||||
last_dwt_value = DWT->CYCCNT;
|
||||
HAL_COMP_Start(&hcomp1);
|
||||
furi_hal_rfid_comp_start();
|
||||
}
|
||||
|
||||
void KeyReader::stop_comaparator(void) {
|
||||
@@ -127,23 +125,19 @@ void KeyReader::stop_comaparator(void) {
|
||||
// rfid_pins_reset will disable ibutton pin
|
||||
furi_hal_ibutton_start();
|
||||
|
||||
HAL_COMP_Stop(&hcomp1);
|
||||
api_interrupt_remove(comparator_callback_pointer, InterruptTypeComparatorTrigger);
|
||||
furi_hal_rfid_comp_stop();
|
||||
furi_hal_rfid_comp_set_callback(NULL, NULL);
|
||||
}
|
||||
|
||||
void KeyReader::comparator_trigger_callback(void* hcomp, void* comp_ctx) {
|
||||
void KeyReader::comparator_trigger_callback(bool level, void* comp_ctx) {
|
||||
KeyReader* _this = static_cast<KeyReader*>(comp_ctx);
|
||||
|
||||
if(hcomp == &hcomp1) {
|
||||
uint32_t current_dwt_value = DWT->CYCCNT;
|
||||
uint32_t current_dwt_value = DWT->CYCCNT;
|
||||
|
||||
_this->cyfral_decoder.process_front(
|
||||
hal_gpio_get_rfid_in_level(), current_dwt_value - last_dwt_value);
|
||||
_this->metakom_decoder.process_front(
|
||||
hal_gpio_get_rfid_in_level(), current_dwt_value - last_dwt_value);
|
||||
_this->cyfral_decoder.process_front(level, current_dwt_value - last_dwt_value);
|
||||
_this->metakom_decoder.process_front(level, current_dwt_value - last_dwt_value);
|
||||
|
||||
last_dwt_value = current_dwt_value;
|
||||
}
|
||||
last_dwt_value = current_dwt_value;
|
||||
}
|
||||
|
||||
void KeyReader::switch_to(ReadMode mode) {
|
||||
|
@@ -28,8 +28,8 @@ private:
|
||||
bool verify_key(iButtonKeyType key_type, const uint8_t* const data, uint8_t data_size);
|
||||
|
||||
// cyfral and metakom readers data
|
||||
void comparator_trigger_callback(void* hcomp, void* comp_ctx);
|
||||
void (*comparator_callback_pointer)(void* hcomp, void* comp_ctx);
|
||||
void comparator_trigger_callback(bool level, void* comp_ctx);
|
||||
void (*comparator_callback_pointer)(bool level, void* comp_ctx);
|
||||
|
||||
void start_comaparator(void);
|
||||
void stop_comaparator(void);
|
||||
@@ -51,4 +51,4 @@ private:
|
||||
|
||||
void switch_to(ReadMode mode);
|
||||
void switch_mode_if_needed();
|
||||
};
|
||||
};
|
||||
|
@@ -2,8 +2,6 @@
|
||||
#include <callback-connector.h>
|
||||
#include <maxim_crc.h>
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
KeyReader::Error KeyWorker::read(iButtonKey* key) {
|
||||
KeyReader::Error result = key_reader.read(key);
|
||||
|
||||
@@ -51,4 +49,4 @@ KeyWorker::KeyWorker(const GpioPin* one_wire_gpio)
|
||||
}
|
||||
|
||||
KeyWorker::~KeyWorker() {
|
||||
}
|
||||
}
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include <stm32wbxx_ll_cortex.h>
|
||||
#include <tim.h>
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
/**
|
||||
* @brief private violation assistant for RfidReader
|
||||
*/
|
||||
@@ -63,14 +61,10 @@ void RfidReader::switch_mode() {
|
||||
switch_timer_reset();
|
||||
}
|
||||
|
||||
static void comparator_trigger_callback(void* hcomp, void* comp_ctx) {
|
||||
COMP_HandleTypeDef* _hcomp = static_cast<COMP_HandleTypeDef*>(hcomp);
|
||||
static void comparator_trigger_callback(bool level, void* comp_ctx) {
|
||||
RfidReader* _this = static_cast<RfidReader*>(comp_ctx);
|
||||
|
||||
if(hcomp == &hcomp1) {
|
||||
RfidReaderAccessor::decode(
|
||||
*_this, (HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_HIGH));
|
||||
}
|
||||
RfidReaderAccessor::decode(*_this, !level);
|
||||
}
|
||||
|
||||
RfidReader::RfidReader() {
|
||||
@@ -163,25 +157,13 @@ bool RfidReader::any_read() {
|
||||
}
|
||||
|
||||
void RfidReader::start_comparator(void) {
|
||||
api_interrupt_add(comparator_trigger_callback, InterruptTypeComparatorTrigger, this);
|
||||
furi_hal_rfid_comp_set_callback(comparator_trigger_callback, this);
|
||||
last_dwt_value = DWT->CYCCNT;
|
||||
|
||||
hcomp1.Init.InputMinus = COMP_INPUT_MINUS_1_2VREFINT;
|
||||
hcomp1.Init.InputPlus = COMP_INPUT_PLUS_IO1;
|
||||
hcomp1.Init.OutputPol = COMP_OUTPUTPOL_NONINVERTED;
|
||||
hcomp1.Init.Hysteresis = COMP_HYSTERESIS_HIGH;
|
||||
hcomp1.Init.BlankingSrce = COMP_BLANKINGSRC_NONE;
|
||||
hcomp1.Init.Mode = COMP_POWERMODE_MEDIUMSPEED;
|
||||
hcomp1.Init.WindowMode = COMP_WINDOWMODE_DISABLE;
|
||||
hcomp1.Init.TriggerMode = COMP_TRIGGERMODE_IT_RISING_FALLING;
|
||||
if(HAL_COMP_Init(&hcomp1) != HAL_OK) {
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
HAL_COMP_Start(&hcomp1);
|
||||
furi_hal_rfid_comp_start();
|
||||
}
|
||||
|
||||
void RfidReader::stop_comparator(void) {
|
||||
HAL_COMP_Stop(&hcomp1);
|
||||
api_interrupt_remove(comparator_trigger_callback, InterruptTypeComparatorTrigger);
|
||||
}
|
||||
furi_hal_rfid_comp_stop();
|
||||
furi_hal_rfid_comp_set_callback(NULL, NULL);
|
||||
}
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include "protocols/protocol_hid_h10301.h"
|
||||
#include "protocols/protocol_indala_40134.h"
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
/**
|
||||
* @brief all timings are specified in field clocks (field clock = 125 kHz, 8 us)
|
||||
*
|
||||
|
@@ -1,35 +1,16 @@
|
||||
#include "lfrfid_debug_app_scene_tune.h"
|
||||
#include <furi_hal.h>
|
||||
|
||||
extern COMP_HandleTypeDef hcomp1;
|
||||
|
||||
static void comparator_trigger_callback(void* hcomp, void* comp_ctx) {
|
||||
COMP_HandleTypeDef* _hcomp = static_cast<COMP_HandleTypeDef*>(hcomp);
|
||||
|
||||
if(hcomp == &hcomp1) {
|
||||
hal_gpio_write(&gpio_ext_pa7, HAL_COMP_GetOutputLevel(_hcomp) == COMP_OUTPUT_LEVEL_HIGH);
|
||||
}
|
||||
static void comparator_trigger_callback(bool level, void* comp_ctx) {
|
||||
hal_gpio_write(&gpio_ext_pa7, !level);
|
||||
}
|
||||
|
||||
void LfRfidDebugAppSceneTune::on_enter(LfRfidDebugApp* app, bool need_restore) {
|
||||
app->view_controller.switch_to<LfRfidViewTuneVM>();
|
||||
hal_gpio_init_simple(&gpio_ext_pa7, GpioModeOutputPushPull);
|
||||
|
||||
api_interrupt_add(comparator_trigger_callback, InterruptTypeComparatorTrigger, this);
|
||||
|
||||
hcomp1.Init.InputMinus = COMP_INPUT_MINUS_1_2VREFINT;
|
||||
hcomp1.Init.InputPlus = COMP_INPUT_PLUS_IO1;
|
||||
hcomp1.Init.OutputPol = COMP_OUTPUTPOL_NONINVERTED;
|
||||
hcomp1.Init.Hysteresis = COMP_HYSTERESIS_HIGH;
|
||||
hcomp1.Init.BlankingSrce = COMP_BLANKINGSRC_NONE;
|
||||
hcomp1.Init.Mode = COMP_POWERMODE_MEDIUMSPEED;
|
||||
hcomp1.Init.WindowMode = COMP_WINDOWMODE_DISABLE;
|
||||
hcomp1.Init.TriggerMode = COMP_TRIGGERMODE_IT_RISING_FALLING;
|
||||
if(HAL_COMP_Init(&hcomp1) != HAL_OK) {
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
HAL_COMP_Start(&hcomp1);
|
||||
furi_hal_rfid_comp_set_callback(comparator_trigger_callback, this);
|
||||
furi_hal_rfid_comp_start();
|
||||
|
||||
furi_hal_rfid_pins_read();
|
||||
furi_hal_rfid_tim_read(125000, 0.5);
|
||||
@@ -50,11 +31,11 @@ bool LfRfidDebugAppSceneTune::on_event(LfRfidDebugApp* app, LfRfidDebugApp::Even
|
||||
}
|
||||
|
||||
void LfRfidDebugAppSceneTune::on_exit(LfRfidDebugApp* app) {
|
||||
HAL_COMP_Stop(&hcomp1);
|
||||
api_interrupt_remove(comparator_trigger_callback, InterruptTypeComparatorTrigger);
|
||||
furi_hal_rfid_comp_stop();
|
||||
furi_hal_rfid_comp_set_callback(NULL, NULL);
|
||||
|
||||
hal_gpio_init_simple(&gpio_ext_pa7, GpioModeAnalog);
|
||||
furi_hal_rfid_tim_read_stop();
|
||||
furi_hal_rfid_tim_reset();
|
||||
furi_hal_rfid_pins_reset();
|
||||
}
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ typedef struct {
|
||||
uint8_t volume_id_max;
|
||||
} State;
|
||||
|
||||
const float volumes[] = {0, 0.02, 0.05, 0.1, 0.5};
|
||||
const float volumes[] = {0, .25, .5, .75, 1};
|
||||
|
||||
bool is_white_note(const MelodyEventRecord* note_record, uint8_t id) {
|
||||
if(note_record == NULL) return false;
|
||||
@@ -332,10 +332,10 @@ void process_note(
|
||||
// play note
|
||||
float note_delay = bar_length_ms / (float)note_record->length;
|
||||
if(note_record->note != N) {
|
||||
hal_pwm_set(volume, note_record->note, &SPEAKER_TIM, SPEAKER_CH);
|
||||
furi_hal_speaker_start(note_record->note, volume);
|
||||
}
|
||||
delay(note_delay);
|
||||
hal_pwm_stop(&SPEAKER_TIM, SPEAKER_CH);
|
||||
furi_hal_speaker_stop();
|
||||
}
|
||||
|
||||
void music_player_thread(void* p) {
|
||||
@@ -447,7 +447,7 @@ int32_t music_player_app(void* p) {
|
||||
}
|
||||
|
||||
osThreadTerminate(player);
|
||||
hal_pwm_stop(&SPEAKER_TIM, SPEAKER_CH);
|
||||
furi_hal_speaker_stop();
|
||||
view_port_enabled_set(view_port, false);
|
||||
gui_remove_view_port(gui, view_port);
|
||||
furi_record_close("gui");
|
||||
|
@@ -9,7 +9,7 @@ extern "C" {
|
||||
typedef struct NotificationApp NotificationApp;
|
||||
typedef struct {
|
||||
float frequency;
|
||||
float pwm;
|
||||
float volume;
|
||||
} NotificationMessageDataSound;
|
||||
|
||||
typedef struct {
|
||||
|
@@ -139,12 +139,12 @@ void notification_vibro_off() {
|
||||
furi_hal_vibro_on(false);
|
||||
}
|
||||
|
||||
void notification_sound_on(float pwm, float freq) {
|
||||
hal_pwm_set(pwm, freq, &SPEAKER_TIM, SPEAKER_CH);
|
||||
void notification_sound_on(float freq, float volume) {
|
||||
furi_hal_speaker_start(freq, volume);
|
||||
}
|
||||
|
||||
void notification_sound_off() {
|
||||
hal_pwm_stop(&SPEAKER_TIM, SPEAKER_CH);
|
||||
furi_hal_speaker_stop();
|
||||
}
|
||||
|
||||
// display timer
|
||||
@@ -236,8 +236,8 @@ void notification_process_notification_message(
|
||||
break;
|
||||
case NotificationMessageTypeSoundOn:
|
||||
notification_sound_on(
|
||||
notification_message->data.sound.pwm * speaker_volume_setting,
|
||||
notification_message->data.sound.frequency);
|
||||
notification_message->data.sound.frequency,
|
||||
notification_message->data.sound.volume * speaker_volume_setting);
|
||||
reset_mask |= reset_sound_mask;
|
||||
break;
|
||||
case NotificationMessageTypeSoundOff:
|
||||
|
@@ -17,7 +17,7 @@ for octave in range(9):
|
||||
print(f"const NotificationMessage message_note_{name}{octave}" + " = {\n"
|
||||
"\t.type = NotificationMessageTypeSoundOn,\n"
|
||||
f"\t.data.sound.frequency = {round(note, 2)}f,\n"
|
||||
"\t.data.sound.pwm = 0.5f,\n"
|
||||
"\t.data.sound.volume = 1.0f,\n"
|
||||
"};")
|
||||
note = note * cf
|
||||
|
||||
@@ -29,545 +29,545 @@ for octave in range(9):
|
||||
const NotificationMessage message_click = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 16.35f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 17.32f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 18.35f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 19.45f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 20.6f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 21.83f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 23.12f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 24.5f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 25.96f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 27.5f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 29.14f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b0 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 30.87f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 32.7f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 34.65f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 36.71f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 38.89f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 41.2f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 43.65f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 46.25f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 49.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 51.91f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 55.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 58.27f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b1 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 61.74f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 65.41f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 69.3f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 73.42f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 77.78f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 82.41f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 87.31f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 92.5f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 98.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 103.83f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 110.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 116.54f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b2 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 123.47f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 130.81f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 138.59f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 146.83f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 155.56f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 164.81f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 174.61f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 185.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 196.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 207.65f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 220.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 233.08f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b3 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 246.94f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 261.63f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 277.18f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 293.66f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 311.13f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 329.63f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 349.23f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 369.99f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 392.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 415.3f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 440.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 466.16f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b4 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 493.88f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 523.25f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 554.37f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 587.33f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 622.25f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 659.26f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 698.46f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 739.99f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 783.99f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 830.61f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 880.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 932.33f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b5 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 987.77f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1046.5f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1108.73f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1174.66f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1244.51f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1318.51f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1396.91f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1479.98f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1567.98f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1661.22f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1760.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1864.66f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b6 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 1975.53f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2093.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2217.46f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2349.32f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2489.02f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2637.02f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2793.83f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 2959.96f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 3135.96f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 3322.44f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 3520.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 3729.31f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b7 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 3951.07f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_c8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 4186.01f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_cs8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 4434.92f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_d8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 4698.64f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_ds8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 4978.03f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_e8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 5274.04f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_f8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 5587.65f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_fs8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 5919.91f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_g8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 6271.93f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_gs8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 6644.88f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_a8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 7040.0f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_as8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 7458.62f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
const NotificationMessage message_note_b8 = {
|
||||
.type = NotificationMessageTypeSoundOn,
|
||||
.data.sound.frequency = 7902.13f,
|
||||
.data.sound.pwm = 0.5f,
|
||||
.data.sound.volume = 1.0f,
|
||||
};
|
||||
|
@@ -43,7 +43,7 @@ const char* const volume_text[VOLUME_COUNT] = {
|
||||
"75%",
|
||||
"100%",
|
||||
};
|
||||
const float volume_value[VOLUME_COUNT] = {0.0f, 0.04f, 0.1f, 0.2f, 1.0f};
|
||||
const float volume_value[VOLUME_COUNT] = {0.0f, 0.25f, 0.5f, 0.75f, 1.0f};
|
||||
|
||||
#define DELAY_COUNT 6
|
||||
const char* const delay_text[DELAY_COUNT] = {
|
||||
|
Reference in New Issue
Block a user