setting cursor to off would keep its last state active. fixed. cursor wouldn't turn off all the way and would glitch out. fixed. cursor now has a nicer fadeout. fixed potentiometer scaling factors. tried fixing clockspeed stuff. with these changes clock speed can more reliably change to 24MHz or 48MHz, but this isn't thoroughly tested. 3MHz to 24MHz was still crashing. as ADC is in use, code would need to be refactored to not change clock speed while ADC is converting. since I don't want to do this right now, this will run at a fixed speed at the expense of 0.5-1mA. editor buttons working and updated to the new arrangement, but not tested in depth. pressing and holding to exit parameter editor while edit mode active would result in next entry into parameter editor being in edit mode. fixed. lsens / stat LED now functioning in program and parameter edit modes.
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
/********************************** (C) COPYRIGHT *******************************
|
|
* File Name : system_ch32x035.h
|
|
* Author : WCH
|
|
* Version : V1.0.0
|
|
* Date : 2023/04/06
|
|
* Description : CH32X035 Device Peripheral Access Layer System Header File.
|
|
*********************************************************************************
|
|
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
|
* Attention: This software (modified or not) and binary are used for
|
|
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
|
*******************************************************************************/
|
|
#ifndef __SYSTEM_CH32X035_H
|
|
#define __SYSTEM_CH32X035_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
|
|
#define SYSCLK_FREQ_3MHz_HSI 3000000
|
|
#define SYSCLK_FREQ_8MHz_HSI 8000000
|
|
#define SYSCLK_FREQ_12MHz_HSI 12000000
|
|
#define SYSCLK_FREQ_16MHz_HSI 16000000
|
|
#define SYSCLK_FREQ_24MHz_HSI 24000000
|
|
#define SYSCLK_FREQ_48MHz_HSI HSI_VALUE
|
|
|
|
|
|
|
|
extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */
|
|
|
|
|
|
|
|
/* System_Exported_Functions */
|
|
void SystemInit(void);
|
|
void SystemCoreClockUpdate(void);
|
|
|
|
void SetSysClock(uint32_t clock);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|