Skip to content

Incorrect gpio macros for x035 (possibly others) #631

Open
@BogdanTheGeek

Description

@BogdanTheGeek

Made a ticket for this as IDK when i'll be able to get to it, someone might before me

#if defined(CH32X03x)
#define funPinMode( pin, mode ) { *((&GpioOf(pin)->CFGLR)+((pin&0x8)>>3)) = ( (*((&GpioOf(pin)->CFGLR)+((pin&0x8)>>3))) & (~(0xf<<(4*((pin)&0x7))))) | ((mode)<<(4*((pin)&0x7))); }

^ doesn't work with pins > 7

Also the GPIO_CFGLR_PIN_MODE_Typedef is incorrect.

Image

Image

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