// display a row inline void rowshow(unsigned char row) { // output data of the current row to the column drivers COLPORT1 = pixmap[0][row][0]; COLPORT2 = pixmap[0][row][1]; OUTPUT_ON(LATCH_R); OUTPUT_OFF(LATCH_R); COLPORT1 = pixmap[1][row][0]; COLPORT2 = pixmap[1][row][1]; OUTPUT_ON(LATCH_G); OUTPUT_OFF(LATCH_G); COLPORT1 = pixmap[2][row][0]; COLPORT2 = pixmap[2][row][1]; OUTPUT_ON(LATCH_B); OUTPUT_OFF(LATCH_B); }
// initialize laser void init_laser_driver(){ create_test_pattern(); SET_DDR(LASER); SET_DDR(LASER_PWM); OUTPUT_ON(LASER_PWM); TCCR1B = 1; }