What is the added value of x=x; in driver code (FSMC)
I am porting ILI9341 code from Keil to Cube MX.
The original code contains:
void LCD_WR_REG(vu16 regval)
{
regval=regval; //ʹÓÃ-O2ÓÅ»¯µÄʱºò,±ØÐë²åÈëµÄÑÓʱ
LCD->LCD_REG=regval;//дÈëҪдµÄ¼Ä´æÆ÷ÐòºÅ
}
vu16 seems to be __IO uint16_t i.e. volatile uint16_t
my question: regval=regval; seems obsolete code, but as the driver code seems to be written by somebody that knows what he or she is doing, I wonder what the reason behind this statement would be?
