diff --git a/lib/bus/iec/iec.cpp b/lib/bus/iec/iec.cpp index 19ad3142f..891df3b87 100644 --- a/lib/bus/iec/iec.cpp +++ b/lib/bus/iec/iec.cpp @@ -68,6 +68,7 @@ static void onTimer(void *info) //portEXIT_CRITICAL_ISR(&parent->timerMux); } +#if 0 static void ml_iec_intr_task(void* arg) { while ( true ) @@ -79,6 +80,7 @@ static void ml_iec_intr_task(void* arg) taskYIELD(); } } +#endif void systemBus::init_gpio(gpio_num_t _pin) { @@ -328,14 +330,14 @@ void IRAM_ATTR systemBus::service() auto d = deviceById(data.device); if (d != nullptr) { - device_state_t device_state = d->queue_command(data); + d->queue_command(data); //fnLedManager.set(eLed::LED_BUS, true); //Debug_printv("bus[%d] device[%d]", state, device_state); // for (auto devicep : _daisyChain) // { - device_state = d->process(); + d->process(); if ( data.primary == IEC_TALK ) data.init(); // } @@ -909,7 +911,7 @@ void systemBus::reset_all_our_devices() void systemBus::setBitTiming(std::string set, int p1, int p2, int p3, int p4) { uint8_t i = 0; // Send - if (mstr::equals(set, "r")) i = 1; + if (mstr::equals(set, (char *) "r")) i = 1; if (p1) protocol->bit_pair_timing[i][0] = p1; if (p2) protocol->bit_pair_timing[i][1] = p2; if (p3) protocol->bit_pair_timing[i][2] = p3; diff --git a/lib/bus/iec/protocol/_protocol.cpp b/lib/bus/iec/protocol/_protocol.cpp index a5eb2e3ae..e94d1041e 100644 --- a/lib/bus/iec/protocol/_protocol.cpp +++ b/lib/bus/iec/protocol/_protocol.cpp @@ -24,8 +24,9 @@ IECProtocol::IECProtocol() { esp_timer_create_args_t args = { .callback = onTimer, .arg = this, - .dispatch_method = ESP_TIMER_ISR, - .name = "onTimer" + .dispatch_method = ESP_TIMER_TASK, + .name = "onTimer", + .skip_unhandled_events = 0, }; esp_timer_create(&args, &timer_handle); }; @@ -193,4 +194,4 @@ bool IRAM_ATTR IECProtocol::wait(size_t wait_us, uint64_t start, bool watch_atn) return true; } -#endif /* BUILD_IEC */ \ No newline at end of file +#endif /* BUILD_IEC */ diff --git a/lib/bus/iec/protocol/cpbstandardserial.cpp b/lib/bus/iec/protocol/cpbstandardserial.cpp index 30ca48c02..95590daee 100644 --- a/lib/bus/iec/protocol/cpbstandardserial.cpp +++ b/lib/bus/iec/protocol/cpbstandardserial.cpp @@ -74,7 +74,8 @@ CPBStandardSerial::CPBStandardSerial() .callback = onSendBits, .arg = this, .dispatch_method = ESP_TIMER_ISR, - .name = "onSendBits" + .name = "onSendBits", + .skip_unhandled_events = 0, }; esp_timer_create(&args, &timer_send_h); //Debug_printv("send_timer_create"); @@ -614,4 +615,4 @@ bool CPBStandardSerial::sendBits ( uint8_t data ) return true; } // sendBits -#endif // BUILD_IEC \ No newline at end of file +#endif // BUILD_IEC diff --git a/lib/bus/iec/protocol/jiffydos.cpp b/lib/bus/iec/protocol/jiffydos.cpp index 7c965f090..a9b609f60 100644 --- a/lib/bus/iec/protocol/jiffydos.cpp +++ b/lib/bus/iec/protocol/jiffydos.cpp @@ -52,7 +52,9 @@ JiffyDOS::JiffyDOS() { esp_timer_create_args_t args = { .callback = onTimer, .arg = this, - .name = nullptr + .dispatch_method = ESP_TIMER_TASK, + .name = nullptr, + .skip_unhandled_events = 0, }; esp_timer_create(&args, &timer_handle); }; @@ -198,4 +200,4 @@ bool JiffyDOS::sendByte ( uint8_t data, bool signalEOI ) return true; } // sendByte -#endif /* BUILD_IEC*/ \ No newline at end of file +#endif /* BUILD_IEC*/ diff --git a/lib/device/iec/drive.cpp b/lib/device/iec/drive.cpp index 1e1903f31..ba0b6c133 100644 --- a/lib/device/iec/drive.cpp +++ b/lib/device/iec/drive.cpp @@ -636,7 +636,9 @@ bool iecDrive::registerStream ( uint8_t channel ) // Debug_printv("_file[%s]", _file.c_str()); // TODO: Determine mode and create the proper stream +#if 0 std::ios_base::openmode mode = std::ios_base::in; +#endif Debug_printv("_base[%s]", _base->url.c_str()); _base.reset( MFSOwner::File( _base->url ) ); @@ -1085,7 +1087,9 @@ bool iecDrive::sendFile() uint8_t b; // byte // uint8_t nb; // next byte +#if 0 uint8_t bi = 0; +#endif uint16_t load_address = 0; uint16_t sys_address = 0; @@ -1255,7 +1259,9 @@ bool iecDrive::saveFile() bool success = true; bool done = false; +#if 0 size_t bi = 0; +#endif size_t load_address = 0; size_t b_len = 1; uint8_t b[b_len]; @@ -1363,4 +1369,4 @@ void iecDrive::sendFileNotFound() state = DEVICE_ERROR; } // sendFileNotFound -#endif /* BUILD_IEC */ \ No newline at end of file +#endif /* BUILD_IEC */ diff --git a/lib/hardware/fnSystem.cpp b/lib/hardware/fnSystem.cpp index 1b1da72a2..a7efeceba 100755 --- a/lib/hardware/fnSystem.cpp +++ b/lib/hardware/fnSystem.cpp @@ -93,6 +93,7 @@ #ifdef ESP_PLATFORM +#if defined(BUILD_ATARI) || defined(PINMAP_ESP32S3) static QueueHandle_t card_detect_evt_queue = NULL; static void IRAM_ATTR card_detect_isr_handler(void *arg) @@ -141,6 +142,8 @@ static void setup_card_detect(gpio_num_t pin) // Add the card detect handler gpio_isr_handler_add(pin, card_detect_isr_handler, (void *)pin); } +#endif // PINMAP_ESP32S3 + // ESP_PLATFORM #else // !ESP_PLATFORM diff --git a/lib/http/fnHttpClient.cpp b/lib/http/fnHttpClient.cpp index 9997d0bdf..79b774493 100755 --- a/lib/http/fnHttpClient.cpp +++ b/lib/http/fnHttpClient.cpp @@ -473,8 +473,10 @@ int fnHttpClient::_perform() // Debug_printf("%08lx _perform notified\r\n", fnSystem.millis()); // Debug_printf("Notification of headers loaded\r\n"); +#if 0 bool chunked = esp_http_client_is_chunked_response(_handle); int length = esp_http_client_get_content_length(_handle); +#endif int status; switch (_client_err) { @@ -564,9 +566,11 @@ int fnHttpClient::_perform_stream(esp_http_client_method_t method, uint8_t *writ } // Collect results +#if 0 bool chunked = esp_http_client_is_chunked_response(_handle); - int status = esp_http_client_get_status_code(_handle); int length = esp_http_client_get_content_length(_handle); +#endif + int status = esp_http_client_get_status_code(_handle); #ifdef VERBOSE_HTTP Debug_printf("status = %d, length = %d, chunked = %d\r\n", status, length, chunked ? 1 : 0); #endif @@ -849,4 +853,4 @@ void fnHttpClient::set_header_value(const char *name, const char *value) it->second = std::string(value); } -} \ No newline at end of file +} diff --git a/lib/meatloaf/network/http.cpp b/lib/meatloaf/network/http.cpp index 69bff1241..247f1df2d 100644 --- a/lib/meatloaf/network/http.cpp +++ b/lib/meatloaf/network/http.cpp @@ -392,20 +392,19 @@ int MeatHttpClient::openAndFetchHeaders(esp_http_client_method_t meth, int resum return 0; mstr::replaceAll(url, " ", "%20"); - esp_http_client_config_t config = { - .url = url.c_str(), - .auth_type = HTTP_AUTH_TYPE_BASIC, - .user_agent = USER_AGENT, - .method = meth, - .timeout_ms = 10000, - .max_redirection_count = 10, - .event_handler = _http_event_handler, - .user_data = this, - .keep_alive_enable = true, - .keep_alive_idle = 10, - .keep_alive_interval = 1 - }; - + esp_http_client_config_t config; + memset(&config, 0, sizeof(config)); + config.url = url.c_str(); + config.auth_type = HTTP_AUTH_TYPE_BASIC; + config.user_agent = USER_AGENT; + config.method = meth; + config.timeout_ms = 10000; + config.max_redirection_count = 10; + config.event_handler = _http_event_handler; + config.user_data = this; + config.keep_alive_enable = true; + config.keep_alive_idle = 10; + config.keep_alive_interval = 1; //Debug_printv("HTTP Init url[%s]", url.c_str()); _http = esp_http_client_init(&config); diff --git a/lib/meatloaf/wrappers/iec_buffer.cpp b/lib/meatloaf/wrappers/iec_buffer.cpp index c95a29356..abb67f68c 100644 --- a/lib/meatloaf/wrappers/iec_buffer.cpp +++ b/lib/meatloaf/wrappers/iec_buffer.cpp @@ -135,7 +135,7 @@ void oiecstream::putUtf8(U8Char* codePoint) { //Serial.printf("%c",codePoint->toPetscii()); //Debug_printv("oiecstream calling put"); auto c = codePoint->toPetscii(); - put(codePoint->toPetscii()); + put(c); } // void oiecstream::writeLn(std::string line) { @@ -153,4 +153,4 @@ void oiecstream::putUtf8(U8Char* codePoint) { // (*this) << converted; // } -#endif /* BUILD_IEC */ \ No newline at end of file +#endif /* BUILD_IEC */