![]() Still nothing compared to the skin rashes and headaches I would get just thinking of using C. If we could get a bit more complex program to compare, that would be good. If someone could find a C blinker program for the Xmega that uses RTC instead of delay_ms, that would be great. ![]() I could easily add RTC to the c++ program. One reason for the bigger C++ program could be that the C++ compiler doesn't produce as good AVR code. lss files and I noticed one place where the C compiler used rcall and rjmp and the C++ compiler used call and jmp. I don't know much about the AVR instructions, but it seems the call could be replaced with rcall. I'm using the C++ compiler that came with the last Atmel Studio 7 Version Maybe the jmp could be replaces with rjmp also, but I don't know how far the rjmp can jump. You are making it more complicated than it needs to be. (new Port_c_device)->Set_out_pins_high(Port_device::Pin7) (new Port_c_device)->Set_pins_direction_out(Port_device::Pin7) If I was required to write this in my application code I think I would skip C++. No offense meant, but that is what we are trying to escape.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |