Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blink example doesn't work with P3 #31

Open
nerdralph opened this issue Oct 9, 2020 · 0 comments
Open

blink example doesn't work with P3 #31

nerdralph opened this issue Oct 9, 2020 · 0 comments

Comments

@nerdralph
Copy link
Contributor

I changed the blink example to use an function for changing the pin mode, so it will work with any GPIO pin on P1 or P3.
https://github.com/nerdralph/ch554_sdcc/blob/master/examples/blink/main.c

The LED GPIO is defined by its SFR bit address. I wanted to use the address of the port bit, but SDCC doesn't permit the address operator on __sbit i.e. pushPull(&P1_4);.
If you like this solution, I'll submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant