Hi there,
I recently switched from an Arduino Uno to an Arduino Due for my project with a screen which have backlight functionality.
I use a timer which allows me, if the user does not press the buttons for a certain time, to control the decrease in brightness of the screen. My project works very well on Arduino Uno.
On Arduino Due, I add only one more line which makes me crash the compilation. I followed the datasheets, .h files and some posts on the forum.
REG_TC0_CCR0 |= TC_CCR_CLKEN;
My code works without this line. Here are the errors I have:
In file included from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h:312:0,
from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam3xa/include/sam3xa.h:44,
from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam3.h:59,
from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam.h:198,
from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/libsam/chip.h:25,
from C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:42,
from C:\Users\CA_ELEC\Desktop\Projet\Projet.ino:8:
C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam3xa/include/instance/instance_tc0.h:77:31: error: expected ')' before '*' token
#define REG_TC0_CCR0 (*(WoReg*)0x40080000U) /**< \brief (TC0) Channel Control Register (channel = 0) */
^
C:\Users\CA_ELEC\Desktop\Projet\Projet.ino:42:1: note: in expansion of macro 'REG_TC0_CCR0'
REG_TC0_CCR0 |= TC_CCR_CLKEN;
^
C:\Users\CA_ELEC\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\system/CMSIS/Device/ATMEL/sam3xa/include/instance/instance_tc0.h:77:31: error: expected ')' before '*' token
#define REG_TC0_CCR0 (*(WoReg*)0x40080000U) /**< \brief (TC0) Channel Control Register (channel = 0) */
^
C:\Users\CA_ELEC\Desktop\Projet\Projet.ino:42:1: note: in expansion of macro 'REG_TC0_CCR0'
REG_TC0_CCR0 |= TC_CCR_CLKEN;
^
Plusieurs bibliothèque trouvées pour "Adafruit_RGBLCDShield.h"
Utilisé : C:\Users\CA_ELEC\Documents\Arduino\libraries\Adafruit_RGB_LCD_Shield_Library
Non utilisé : C:\Users\CA_ELEC\Documents\Arduino\libraries\Adafruit-RGB-LCD-Shield-Library-master
exit status 1
Erreur de compilation pour la carte Arduino Due (Programming Port)
Did I forget something?
PS: I don't want to use a library to do this task.