initial WIP
lots of code copied over, things filled in to hopefully get the LED matrix lighting up. untested.
This commit is contained in:
51
firmware/app/system_ch32x035.h
Normal file
51
firmware/app/system_ch32x035.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/********************************** (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 HCLK_48MHZ RCC_HPRE_DIV1
|
||||
#define HCLK_24MHZ RCC_HPRE_DIV2
|
||||
#define HCLK_16MHZ RCC_HPRE_DIV3
|
||||
#define HCLK_12MHZ RCC_HPRE_DIV4
|
||||
#define HCLK_9_6MHZ RCC_HPRE_DIV5
|
||||
#define HCLK_8MHZ RCC_HPRE_DIV6
|
||||
#define HCLK_6_8MHZ RCC_HPRE_DIV7
|
||||
#define HCLK_6MHZ RCC_HPRE_DIV8
|
||||
#define HCLK_3MHZ RCC_HPRE_DIV16
|
||||
#define HCLK_1_5MHZ RCC_HPRE_DIV32
|
||||
#define HCLK_750KHZ RCC_HPRE_DIV64
|
||||
#define HCLK_375KHZ RCC_HPRE_DIV128
|
||||
#define HCLK_187KHZ RCC_HPRE_DIV256
|
||||
|
||||
|
||||
extern uint32_t SystemCoreClock; /* System Clock Frequency (Core Clock) */
|
||||
|
||||
/* System_Exported_Functions */
|
||||
extern void SystemInit(void);
|
||||
extern void SystemCoreClockUpdate(void);
|
||||
|
||||
void SetSysClock_HSI(uint32_t divider);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user