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

digitalPinToPCMSK errors #11

Open
SodaqMoja opened this issue Jul 6, 2014 · 2 comments
Open

digitalPinToPCMSK errors #11

SodaqMoja opened this issue Jul 6, 2014 · 2 comments

Comments

@SodaqMoja
Copy link

It seems to me that the digitalPinToPCMSK macro in all Mighty 1284P variants have never been used, let alone been tested.

The bobuino version will probably give a compilation failure if you would try to use it.
#define digitalPinToPCMSK(p) ifpin(p,__pcmsk[digital_pin_to_pcint[]],(uint8_t *)0)
There is a p missing.

The standard and avr_developers variants will return an incorrect PCMSKx. The macro expansion should match digitalPinToPCMSK right above it. I think that this is what is should be:

#define digitalPinToPCICRbit(p) (((p) <= 7) ? 1 : (((p) <= 15) ? 3 : (((p) <= 23) ? 2 : 0)))
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK1) : (((p) <= 15) ? (&PCMSK3) : (((p) <= 23) ? (&PCMSK2) : (&PCMSK0))))

@avandun
Copy link

avandun commented Sep 8, 2014

I will test it since i having problems to get the bobuino to work with the CC3000 wifi shield and this might be the cause.

@vicatcu
Copy link

vicatcu commented Sep 8, 2014

@avandun I apologize if this is not an appropriate comment for the repository, but have you considered WildFire (wildfire.wickeddevice.com) which is a Mega1284P integrated with a CC3000 on one board?

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

3 participants