let me start by saying I hate having to ask such a newbee question but I just can't seem to find the answer.
Where should F_CPU be defined when using Atmel Studio 7? I have found many answers for other IDEs and including it in the make file. Do I need to make a custom make file just to define the cpu speed? doesn't seem to be the right way to go, I know there are many wrong way to fix this ( including modifying util/delay) but what is the right way? the code below is what I am working on and still gives the warning F_CPU not defined for <util/delay>.
* Created: 10/22/2019 11:49:23 AM
* Author : John
#define F_CPU 16000000UL
char USI_I2C_Master_Start_Transmission(char *msg, char msg_size);
char i2c_transmit_buffer_len = 3;
i2c_transmit_buffer = (0x40 << 1) | 0 ; //Or'ing with 0 is unnecessary, but for clarity's sake this sets the R/W bit for a write.
i2c_transmit_buffer = 0x00; //Internal address
i2c_transmit_buffer = 0x70; //Value to write
//Transmit the I2C message
I have also noted that without the first line I get 2 warning messages saying the same thing so it must be doing something before it gets there.
I have search this site and read through many posts with very good explanations of what it is and how it works but not how to deal with it in studio 7.
Thanks for any help in advance, I know these newbee questions can be a pain.