I'm trying to learn ARM nxp lpc1768,and i also attempting to use CMSIS library in my projects.So i downloaded lpc17xx CMSIS Driver Library Manual to read.
I'm bit confused with code,and unfortunately i can't compile the code in order to make it clear for myself..
what does "1<<21" mean?? is "<<" a shift operator? or it's an assignment operator??
Yes, "<<" is a shift operator. For more details read any C tutorial, example - Bitwise operation - Wikipedia, the free encyclopedia
I'm using CMSIS for LPC11xx but it probably the same. Please take a look into gpio.c file for GPIOSetDir() function description
Code:
/*****************************************************************************
** Function name: GPIOSetDir
**
** Descriptions: Set the direction in GPIO port
**
** parameters: port num, bit position, direction (1 out, 0 input)
** Returned value: None
**
*****************************************************************************/