Skip to content

pinMode OUTPUT_AF_OD vs OUTPUT_OD #233

@Mapy542

Description

@Mapy542

I recently ran into a knowledge issue regarding the utilization of pinMode on the Ch32v003. While writing a small script for a project, I wished to use the open drain IO mode for some communication pins. Intellisense autofilled OUTPUT_AF_OD over OUTPUT_OD for this selection for whatever reason. I wasn't aware the OUTPUT_OD declaration existed. I assume AF stands for alternate function.

pinMode() does not have the switch statement for handling this AF case, and triggers an error. Since to my knowledge there is no alternate mode for ch32v003 pins, I propose to either remove the macro for chips where it does not apply, or add a case to the pinMode function.

I wanted to post this issue to get maintainers opinon on which course of action would be best for a PR, or if I'm mistaken on the purpose of the macro why it functions as it currently stands. Thanks!

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