Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/famicom-dumper-writer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-07-24 23:35:08 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-07-24 23:35:08 +0300
commit87eec7d516780dc20719ce2b655efc459ba3d536 (patch)
tree819ec1a4e3dc9e6d14d508ce4064f169a3c34ff2
parent91db8d77f37bdad1e53d79f7a57eac9186869860 (diff)
More correct LED timings
-rw-r--r--STM32/Core/Src/led.c6
-rw-r--r--STM32/Core/Src/main.c2
-rw-r--r--STM32/FamicomDumper.ioc2
3 files changed, 5 insertions, 5 deletions
diff --git a/STM32/Core/Src/led.c b/STM32/Core/Src/led.c
index 659bdfc..b7902ba 100644
--- a/STM32/Core/Src/led.c
+++ b/STM32/Core/Src/led.c
@@ -100,11 +100,11 @@ void set_led_color(uint8_t r, uint8_t g, uint8_t b)
uint8_t i;
const uint8_t led = 0;
for (i = 0; i < 8; i++)
- pwm_values[led * 8 * 3 + i] = ((r >> (7 - i)) & 1) ? 67 : 22;
+ pwm_values[led * 8 * 3 + i] = ((r >> (7 - i)) & 1) ? 65 : 24;
for (i = 0; i < 8; i++)
- pwm_values[led * 8 * 3 + 8 + i] = ((g >> (7 - i)) & 1) ? 67 : 22;
+ pwm_values[led * 8 * 3 + 8 + i] = ((g >> (7 - i)) & 1) ? 65 : 24;
for (i = 0; i < 8; i++)
- pwm_values[led * 8 * 3 + 16 + i] = ((b >> (7 - i)) & 1) ? 67 : 22;
+ pwm_values[led * 8 * 3 + 16 + i] = ((b >> (7 - i)) & 1) ? 65 : 24;
pwm_values[sizeof(pwm_values) - 1] = 0;
update_led();
}
diff --git a/STM32/Core/Src/main.c b/STM32/Core/Src/main.c
index 369e21d..dbc5577 100644
--- a/STM32/Core/Src/main.c
+++ b/STM32/Core/Src/main.c
@@ -509,7 +509,7 @@ static void MX_TIM5_Init(void)
htim5.Instance = TIM5;
htim5.Init.Prescaler = 0;
htim5.Init.CounterMode = TIM_COUNTERMODE_UP;
- htim5.Init.Period = 89;
+ htim5.Init.Period = 107;
htim5.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim5.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim5) != HAL_OK)
diff --git a/STM32/FamicomDumper.ioc b/STM32/FamicomDumper.ioc
index 782ab76..80ceb6a 100644
--- a/STM32/FamicomDumper.ioc
+++ b/STM32/FamicomDumper.ioc
@@ -340,7 +340,7 @@ TIM3.IPParameters=Prescaler
TIM3.Prescaler=999
TIM5.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
TIM5.IPParameters=Channel-PWM Generation3 CH3,Period,Pulse-PWM Generation3 CH3
-TIM5.Period=89
+TIM5.Period=107
TIM5.Pulse-PWM\ Generation3\ CH3=0
USB_DEVICE.CLASS_NAME_FS=CDC
USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS,VID,MANUFACTURER_STRING,PID_CDC_FS,PRODUCT_STRING_CDC_FS