[FL-1528] SubGhz: dma send (#579)
* Gui: input injection in screen stream * Cli: expose ASCII table in public header * SubGhz: dma output draft * SubGhz: output initialization cleanup * SubGhz: update dma send routine, add subghz_tx cli command. * SubGhz: proper register address for DMA * SubGhz: proper, fully working dma+tim2 configuration * SubGhz: transmit PT with cli. * Drivers: fix invalid size in CC1101 PA_TABLE loading routine. * Interrupts: configurable DMA isrs. * F5: backport fixes. * SubGhz: free buffer after use * SubGhz: use sleep instead of reset at the end * SubGhz: async tx repeat with circular DMA * SubGhz: disable dma channel on complete, adjust PT send timings * SubGhz: backport function singature change to F5 * SubGhz: add tx debug gpio
This commit is contained in:
@@ -100,15 +100,15 @@ bool subghz_static_input(InputEvent* event, void* context) {
|
||||
uint8_t bit = i % 8;
|
||||
bool value = (key[byte] >> (7 - bit)) & 1;
|
||||
// Payload send
|
||||
hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
delay_us(value ? SUBGHZ_PT_ONE : SUBGHZ_PT_ZERO);
|
||||
hal_gpio_write(&gpio_cc1101_g0, true);
|
||||
delay_us(value ? SUBGHZ_PT_ONE : SUBGHZ_PT_ZERO);
|
||||
hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
delay_us(value ? SUBGHZ_PT_ZERO : SUBGHZ_PT_ONE);
|
||||
}
|
||||
// Last bit
|
||||
hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
delay_us(SUBGHZ_PT_ONE);
|
||||
hal_gpio_write(&gpio_cc1101_g0, true);
|
||||
delay_us(SUBGHZ_PT_ONE);
|
||||
hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
// Guard time
|
||||
delay_us(10600);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void subghz_static_enter(void* context) {
|
||||
api_hal_subghz_load_preset(ApiHalSubGhzPresetOokAsync);
|
||||
|
||||
hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
||||
hal_gpio_write(&gpio_cc1101_g0, true);
|
||||
hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
|
||||
with_view_model(
|
||||
subghz_static->view, (SubghzStaticModel * model) {
|
||||
@@ -151,7 +151,7 @@ void subghz_static_exit(void* context) {
|
||||
// SubghzStatic* subghz_static = context;
|
||||
|
||||
// Reinitialize IC to default state
|
||||
api_hal_subghz_init();
|
||||
api_hal_subghz_sleep();
|
||||
}
|
||||
|
||||
uint32_t subghz_static_back(void* context) {
|
||||
|
Reference in New Issue
Block a user