diff --git a/README.md b/README.md index cb5928c..490d0ea 100644 --- a/README.md +++ b/README.md @@ -99,27 +99,27 @@ Note: this list will probably change with each functionality update.   | `realtek-ambz` --------------------|--------------- Core functions | ✔️ -GPIO/PWM/IRQ | ✔️/❓/✔️ +GPIO/PWM/IRQ | ✔️/✔️/✔️ Analog input | ❓ UART I/O | ✔️ -Flash I/O | ❓ +Flash I/O | ✔️ **CORE LIBRARIES** | SoftwareSerial | ❌ SPI | ❌ Wire | ❗ **OTHER LIBRARIES** | Wi-Fi STA/AP/Mixed | ✔️ -Wi-Fi Client (SSL) | ✔️ (✔️) -Wi-Fi Server | ✔️ Wi-Fi Events | ✔️ +TCP Client (SSL) | ✔️ (✔️) +TCP Server | ✔️ IPv6 | ❌ HTTP Client (SSL) | ✔️ (✔️) HTTP Server | ✔️ -NVS / Preferences | ✔️ +NVS / Preferences | ❌ SPIFFS | ❌ BLE | - NTP | ❌ -OTA | ❓ +OTA | ✔️ MDNS | ✔️ MQTT | ✅ SD | ❌ diff --git a/arduino/realtek-ambz/cores/arduino/wiring_analog.c b/arduino/realtek-ambz/cores/arduino/wiring_analog.c index 9eb90f8..1e5695e 100644 --- a/arduino/realtek-ambz/cores/arduino/wiring_analog.c +++ b/arduino/realtek-ambz/cores/arduino/wiring_analog.c @@ -126,7 +126,7 @@ void analogWrite(pin_size_t pinNumber, int value) { pwmout_t *obj; if ((g_APinDescription[pinNumber].ulPinAttribute & PIO_PWM) == PIO_PWM) { - /* Handle */ + float percent = value * 1.0 / (1 << _writeResolution); if (g_APinDescription[pinNumber].ulPinType != PIO_PWM) { if ((g_APinDescription[pinNumber].ulPinType == PIO_GPIO) || (g_APinDescription[pinNumber].ulPinType == PIO_GPIO_IRQ)) { @@ -136,16 +136,13 @@ void analogWrite(pin_size_t pinNumber, int value) { pwmout_t *obj = (pwmout_t *)gpio_pin_struct[pinNumber]; pwmout_init(obj, g_APinDescription[pinNumber].pinname); pwmout_period_us(obj, _writePeriod); - pwmout_write(obj, value * 1.0 / (1 << _writeResolution)); + pwmout_write(obj, percent); g_APinDescription[pinNumber].ulPinType = PIO_PWM; g_APinDescription[pinNumber].ulPinMode = PWM_MODE_ENABLED; } else { pwmout_t *obj = (pwmout_t *)gpio_pin_struct[pinNumber]; - pwmout_period_us(obj, _writePeriod); - pwmout_write(obj, value * 1.0 / (1 << _writeResolution)); - /* if ( g_APinDescription[pinNumber].ulPinMode == PWM_MODE_DISABLED ) { - HAL_Pwm_Enable( &obj->pwm_hal_adp ); - } */ + // pwmout_period_us(obj, _writePeriod); + pwmout_write(obj, percent); } } } diff --git a/platform/realtek-ambz/fixups/lib_rtlstd_patch.a b/platform/realtek-ambz/fixups/lib_rtlstd_patch.a index 59a85f2..66632af 100644 Binary files a/platform/realtek-ambz/fixups/lib_rtlstd_patch.a and b/platform/realtek-ambz/fixups/lib_rtlstd_patch.a differ diff --git a/platform/realtek-ambz/fixups/lib_rtlstd_patch.md b/platform/realtek-ambz/fixups/lib_rtlstd_patch.md index fb20c12..3771200 100644 --- a/platform/realtek-ambz/fixups/lib_rtlstd_patch.md +++ b/platform/realtek-ambz/fixups/lib_rtlstd_patch.md @@ -2,13 +2,9 @@ ``` arm-none-eabi-gcc-ar xo lib_rtlstd.a -arm-none-eabi-objcopy -N __aeabi_fsub rtl_eabi_cast_ram.o -arm-none-eabi-objcopy -N __aeabi_fadd rtl_eabi_cast_ram.o -arm-none-eabi-objcopy -N __aeabi_ui2f rtl_eabi_cast_ram.o -arm-none-eabi-objcopy -N __aeabi_i2f rtl_eabi_cast_ram.o +rm rtl_eabi_cast_ram.o arm-none-eabi-objcopy --strip-debug --strip-unneeded ram_libc.o arm-none-eabi-objcopy --strip-debug --strip-unneeded ram_libgloss_retarget.o -arm-none-eabi-objcopy --strip-debug --strip-unneeded rtl_eabi_cast_ram.o arm-none-eabi-objcopy --strip-debug --strip-unneeded rtl_math_ram.o arm-none-eabi-gcc-ar qs lib_rtlstd_patch.a *.o ```