static void setup_endpoints(void)
{
/* Setup EP2 (IN). */
- EP2CFG = (1 << 7) | /* EP is valid/activated */
- (1 << 6) | /* EP direction: IN */
- (1 << 5) | (0 << 4) | /* EP Type: bulk */
- (1 << 3) | /* EP buffer size: 1024 */
- (0 << 2) | /* Reserved. */
- (0 << 1) | (0 << 0); /* EP buffering: quad buffering */
+ EP2CFG = (1u << 7) | /* EP is valid/activated */
+ (1u << 6) | /* EP direction: IN */
+ (1u << 5) | (0u << 4) | /* EP Type: bulk */
+ (1u << 3) | /* EP buffer size: 1024 */
+ (0u << 2) | /* Reserved. */
+ (0u << 1) | (0u << 0); /* EP buffering: quad buffering */
SYNCDELAY();
/* Disable all other EPs (EP1, EP4, EP6, and EP8). */
* GPIFWFSELECT: [7:6] = SINGLEWR index, [5:4] = SINGLERD index,
* [3:2] = FIFOWR index, [1:0] = FIFORD index
*/
- GPIFWFSELECT = (0x3 << 6) | (0x2 << 4) | (0x1 << 2) | (0x0 << 0);
+ GPIFWFSELECT = (0x3u << 6) | (0x2u << 4) | (0x1u << 2) | (0x0u << 0);
/* Contains RDY* pin values. Read-only according to TRM. */
GPIFREADYSTAT = 0;