DeqingSun / ch55xduino

An Arduino-like programming API for the CH55X
GNU Lesser General Public License v2.1
449 stars 87 forks source link

not an issue, just want to know if there is an equivalent to DDRx is AVR mcu, or ODR in STM32 #130

Closed ranger2012 closed 1 year ago

ranger2012 commented 1 year ago

is it possible to add support for parallel IO to ports. write a 8bit data to ports, rather than setting individual pins.

Thanks,

DeqingSun commented 1 year ago

You can do things like P1=0xFF P3=0xFF etc, read the datasheet for pin and register relationship.

Directions are controlled by P1_MOD_OC, P1_DIR_PU, etc. You can also read https://github.com/DeqingSun/ch55xduino/blob/ch55xduino/ch55xduino/ch55x/cores/ch55xduino/wiring_digital.c

ranger2012 commented 1 year ago

Thank you very much, all is good


From: Deqing Sun @.> Sent: Tuesday, 28 March 2023 1:03 AM To: DeqingSun/ch55xduino @.> Cc: ranger2012 @.>; Author @.> Subject: Re: [DeqingSun/ch55xduino] not an issue, just want to know if there is an equivalent to DDRx is AVR mcu, or ODR in STM32 (Issue #130)

You can do things like P1=0xFF P3=0xFF etc, read the datasheet for pin and register relationship.

Directions are controlled by P1_MOD_OC, P1_DIR_PU, etc. You can also read https://github.com/DeqingSun/ch55xduino/blob/ch55xduino/ch55xduino/ch55x/cores/ch55xduino/wiring_digital.c

— Reply to this email directly, view it on GitHubhttps://github.com/DeqingSun/ch55xduino/issues/130#issuecomment-1485162338, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABAV6GS6DXL4JJTWCSDVWKLW6GMZJANCNFSM6AAAAAAWJDPLKU. You are receiving this because you authored the thread.Message ID: @.***>