Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Horn
ch32v003fun
Commits
435aff8a
Commit
435aff8a
authored
1 year ago
by
cnlohr
Browse files
Options
Downloads
Patches
Plain Diff
Use proper protection for assembly language compilation.
parent
ab3581a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ch32v003fun/ch32v003fun.h
+13
-13
13 additions, 13 deletions
ch32v003fun/ch32v003fun.h
with
13 additions
and
13 deletions
ch32v003fun/ch32v003fun.h
+
13
−
13
View file @
435aff8a
...
...
@@ -60,7 +60,7 @@ extern "C" {
#define HSITRIM 0x10
#endif
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* Interrupt Number Definition, according to the selected device */
typedef
enum
IRQn
...
...
@@ -108,7 +108,7 @@ typedef enum IRQn
#define HSE_Value HSE_VALUE
#define HSEStartUp_TimeOut HSE_STARTUP_TIMEOUT
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* Analog to Digital Converter */
typedef
struct
{
...
...
@@ -370,7 +370,7 @@ typedef struct
#endif
/* Peripheral memory map */
#ifdef ASSEMBLER
#ifdef
__
ASSEMBLER
__
#define FLASH_BASE (0x08000000)
/* FLASH base address in the alias region */
#define SRAM_BASE (0x20000000)
/* SRAM base address in the alias region */
#define PERIPH_BASE (0x40000000)
/* Peripheral base address in the alias region */
...
...
@@ -2811,7 +2811,7 @@ extern "C" {
/* BDCTLR register base address */
#define BDCTLR_ADDRESS (PERIPH_BASE + BDCTLR_OFFSET)
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
static
__I
uint8_t
APBAHBPrescTable
[
16
]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
};
static
__I
uint8_t
ADCPrescTable
[
20
]
=
{
2
,
4
,
6
,
8
,
4
,
8
,
12
,
16
,
8
,
16
,
24
,
32
,
16
,
32
,
48
,
64
,
32
,
64
,
96
,
128
};
#endif
...
...
@@ -3111,7 +3111,7 @@ static __I uint8_t ADCPrescTable[20] = {2, 4, 6, 8, 4, 8, 12, 16, 8, 16, 24, 32,
/* ch32v00x_exti.h -----------------------------------------------------------*/
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* EXTI mode enumeration */
typedef
enum
...
...
@@ -3146,7 +3146,7 @@ typedef enum
/* ch32v00x_flash.h ----------------------------------------------------------*/
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* FLASH Status */
typedef
enum
{
...
...
@@ -3224,7 +3224,7 @@ typedef enum
/* ch32v00x_gpio.h ------------------------------------------------------------*/
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* Output Maximum frequency selection */
typedef
enum
...
...
@@ -3261,7 +3261,7 @@ typedef enum
} GPIOMode_TypeDef;
*/
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* Bit_SET and Bit_RESET enumeration */
typedef
enum
...
...
@@ -3594,7 +3594,7 @@ typedef enum
/* ch32v00x_opa.h ------------------------------------------------------------*/
/* Editor's note: I don't know if this is actually useful */
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* OPA PSEL enumeration */
typedef
enum
...
...
@@ -4254,7 +4254,7 @@ typedef struct
extern
"C"
{
#endif
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/* Standard Peripheral Library old types (maintained for legacy purpose) */
typedef
__I
uint32_t
vuc32
;
/* Read Only */
...
...
@@ -4345,7 +4345,7 @@ typedef struct
#define SysTick ((SysTick_Type *) 0xE000F000)
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
/*********************************************************************
* @fn __enable_irq
...
...
@@ -4860,7 +4860,7 @@ extern "C" {
// Stuff that can only be compiled on device (not for the programmer, or other host programs)
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
void
handle_reset
()
__attribute__
((
naked
))
__attribute
((
section
(
".text.handle_reset"
)))
__attribute__
((
used
));
void
DefaultIRQHandler
(
void
)
__attribute__
((
section
(
".text.vector_handler"
)))
__attribute__
((
naked
))
__attribute__
((
used
));
#endif
...
...
@@ -4874,7 +4874,7 @@ void DefaultIRQHandler( void ) __attribute__((section(".text.vector_handler")))
#define Delay_Us(n) DelaySysTick( (n) * DELAY_US_TIME )
#define Delay_Ms(n) DelaySysTick( (n) * DELAY_MS_TIME )
#ifndef ASSEMBLER
#ifndef
__
ASSEMBLER
__
void
DelaySysTick
(
uint32_t
n
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment