Skip to content

CH32V103R8T6 has 51 I/O pins but arduino file variant_CH32V103R8T6.h says only 22 #154

@MostafaKhan1971

Description

@MostafaKhan1971

Hi,
When I tried to use pin PC7 in a sketch for CH32V103R8T6, the compiler showed this error "Compilation error: 'PC7' was not declared in this scope". When I opened the pin definition file variant_CH32V103R8T6.h I was surprised to see that only 22 IOs are defined instead of the 51 IOs that CH32V103R8T6 has. I searched through the previous repositories and saw it is the same everywhere. I also tried to add the pins manually but due to my lack of expertise I was unable to do so. I would love to get some suggestions on how to handle this.

Screenshot 2024-10-01 001455

`#define PA0 PIN_A0
#define PA1 PIN_A1
#define PA2 PIN_A2
#define PA3 PIN_A3
#define PA4 PIN_A4
#define PA5 PIN_A5

#define PA10 6
#define PA9 7
#define PA8 8
#define PA7 9
#define PA6 10
#define PB5 11
#define PB8 12
#define PB9 13
#define PB1 14
#define PB0 15
#define PB12 16
#define PB15 17
#define PB14 18
#define PB13 19
#define PB11 20
#define PB10 21

// Alternate pins number
#define PA0_ALT1 (PA0 | ALT1)
#define PA1_ALT1 (PA1 | ALT1)
#define PA2_ALT1 (PA2 | ALT1)
#define PA3_ALT1 (PA3 | ALT1)
#define PA4_ALT1 (PA4 | ALT1)
#define PA5_ALT1 (PA5 | ALT1)

#define NUM_DIGITAL_PINS 22
#define NUM_ANALOG_INPUTS 6
// #define ADC_CTLR_ADCAL
#define ADC_RESOLUTION 12`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions