Altera_Forum
Honored Contributor
10 years agoPIO Bitwise operation
Hallo,
What is the best way to perform bit wise operation to clear or set specific bits on Nios II PIO port? An example CTRL_PORT = CTRL_PORT | (1 << CTRL_CS) | (1 << CTRL_RDE) | (1 << CTRL_WR); CTRL_PORT = CTRL_PORT & ~(1 << CTRL_ALE); Where # define CTRL_CS 0# define CTRL_RST 1# define CTRL_RDE 2# define CTRL_WR 3# define CTRL_ALE 4