C++ Libraries based on a pin object Have you tried making it a const?
int constexpr SFR_addr(volatile uint8_t * const sfr){
return reinterpret_cast <int> (sfr);
}
Friday, 11 August 2017 - 03:33
What Makes C++ "Hard"? From a brief search it looks like Microsoft and clang have added extensions to C++ to allow designated initializer's and people are trying to get it added to the next C++ standard...
Monday, 24 July 2017 - 07:53
What Makes C++ "Hard"? I don't think your I/O pin example works well. The problem would be the same with a C or assembler programmer not aware of the current limit.
If someone can't be bothered to read...
Some useful and simple definitions in a header file A good place to share this is Atmel Spaces, so people can find it easier later on. If you don't want to create a whole project for it there's also a snippets section for sharing...
using ASF in a GCC C++ project for XMEGA32A4U I tried making a c++ project and then using the asf wizard but I get this warning...
Quote:ASF modules are not guaranteed to work with c++ project. For best use of ASF modules,...
Saturday, 13 July 2013 - 05:17
turning off the i2c/twi You need to disable I2C (TWCR) in order to read/write the I/O pins. Modifying TWBR and TWSR isn't necessary since it won't help you with this.
When using TWI a different IO...
Wednesday, 10 July 2013 - 03:36
Multiple slaves in TWI There is a lot of information out on the web. I'm not sure you spent enough time looking. You should also read the I2c specification document.
http://www.i2c-bus.org/i2c-bus/...
Have you tried making it a const? int constexpr SFR_addr(volatile uint8_t * const sfr){ return reinterpret_cast <int> (sfr); }
From a brief search it looks like Microsoft and clang have added extensions to C++ to allow designated initializer's and people are trying to get it added to the next C++ standard...
I don't think your I/O pin example works well. The problem would be the same with a C or assembler programmer not aware of the current limit. If someone can't be bothered to read...
Quote:What could be the problem?Are you sure the address is correct?
A good place to share this is Atmel Spaces, so people can find it easier later on. If you don't want to create a whole project for it there's also a snippets section for sharing...
please show us your makefile.
Who is this zombie character you guys keep on talking about? :wink:
TWCR = ( 1 << TWINT ) | ( 1 << TWEA ); // Send ACK I think TWI works better when it's enabled. :wink: :twisted:
I tried making a c++ project and then using the asf wizard but I get this warning... Quote:ASF modules are not guaranteed to work with c++ project. For best use of ASF modules,...
You need to disable I2C (TWCR) in order to read/write the I/O pins. Modifying TWBR and TWSR isn't necessary since it won't help you with this. When using TWI a different IO...
There is a lot of information out on the web. I'm not sure you spent enough time looking. You should also read the I2c specification document. http://www.i2c-bus.org/i2c-bus/...
RRRoamer wrote:...do you have an interrupt managed I2C library you would be willing to share? I have one that's hosted on Atmel Spaces.
Pages