mirror of
https://github.com/demik/quack.git
synced 2024-11-25 10:30:49 +00:00
pin LED and ADB to core 1 again
This commit is contained in:
parent
4d64e67602
commit
12b77f5a64
@ -105,7 +105,7 @@ void adb_init(void) {
|
||||
if (adb_is_host())
|
||||
xTaskCreatePinnedToCore(adb_task_host, "ADB_HOST", 6 * 1024, NULL, tskADB_PRIORITY, NULL, 1);
|
||||
else
|
||||
xTaskCreatePinnedToCore(adb_task_idle, "ADB_MOUSE", 6 * 1024, NULL, tskADB_PRIORITY, NULL, 1);
|
||||
xTaskCreatePinnedToCore(adb_task_idle, "ADB_IDLE", 6 * 1024, NULL, tskADB_PRIORITY, NULL, 1);
|
||||
}
|
||||
|
||||
inline bool adb_is_host(void) {
|
||||
@ -267,15 +267,16 @@ void adb_task_host(void *pvParameters) {
|
||||
|
||||
/*
|
||||
* this do nothing since device mode doesn't work
|
||||
* put GPIO and Level converter on output mode and set everything low
|
||||
* put level converter on input mode with a pull up to avoid oscillations
|
||||
* if plugged into an ADB Bus by mistake.
|
||||
*/
|
||||
|
||||
void adb_task_idle(void *pvParameters) {
|
||||
ESP_LOGI(TAG, "idle started on core %d", xPortGetCoreID());
|
||||
|
||||
/* RMT is not installed via rmt_driver_install() so no need to uninstall */
|
||||
adb_tx_setup();
|
||||
gpio_set_level(GPIO_ADB, 0);
|
||||
adb_rx_setup();
|
||||
ESP_ERROR_CHECK(gpio_pullup_en(GPIO_ADB));
|
||||
|
||||
/*
|
||||
* We sould exit here but for some reason core 1 panic with
|
||||
|
@ -129,10 +129,10 @@ void led_dispatch(void *pvParameters)
|
||||
/* avoit cur duty + target spam on console */
|
||||
esp_log_level_set("ledc", ESP_LOG_INFO);
|
||||
|
||||
xTaskCreate(led_task, led_gpio_name(GPIO_GREENLED), 2 * 1024, (void *) GPIO_GREENLED, tskIDLE_PRIORITY, &t_green);
|
||||
xTaskCreate(led_task, led_gpio_name(GPIO_BLUELED), 2 * 1024, (void *) GPIO_BLUELED, tskIDLE_PRIORITY, &t_blue);
|
||||
xTaskCreate(led_task, led_gpio_name(GPIO_YELLOWLED), 2 * 1024, (void *) GPIO_YELLOWLED, tskIDLE_PRIORITY, &t_yellow);
|
||||
xTaskCreate(led_task, led_gpio_name(GPIO_REDLED), 2 * 1024, (void *) GPIO_REDLED, tskIDLE_PRIORITY, &t_red);
|
||||
xTaskCreatePinnedToCore(led_task, led_gpio_name(GPIO_GREENLED), 2 * 1024, (void *) GPIO_GREENLED, tskIDLE_PRIORITY, &t_green, 1);
|
||||
xTaskCreatePinnedToCore(led_task, led_gpio_name(GPIO_BLUELED), 2 * 1024, (void *) GPIO_BLUELED, tskIDLE_PRIORITY, &t_blue, 1);
|
||||
xTaskCreatePinnedToCore(led_task, led_gpio_name(GPIO_YELLOWLED), 2 * 1024, (void *) GPIO_YELLOWLED, tskIDLE_PRIORITY, &t_yellow, 1);
|
||||
xTaskCreatePinnedToCore(led_task, led_gpio_name(GPIO_REDLED), 2 * 1024, (void *) GPIO_REDLED, tskIDLE_PRIORITY, &t_red, 1);
|
||||
|
||||
/* blink green led fast (we are booting...) */
|
||||
xTaskNotify(t_green, LED_FAST, eSetValueWithOverwrite);
|
||||
|
Loading…
Reference in New Issue
Block a user