Projekt/snake_init.c
void display_init(void) {
        DISPLAY_CHANGE_TO_COMMAND_MODE;
	quicksleep(10);
	DISPLAY_ACTIVATE_VDD;
	quicksleep(1000000);
	
	spi_send_recv(0xAE);
	DISPLAY_ACTIVATE_RESET;
	quicksleep(10);
	DISPLAY_DO_NOT_RESET;
	quicksleep(10);
	
	spi_send_recv(0x8D);
	spi_send_recv(0x14);
	
	spi_send_recv(0xD9);
	spi_send_recv(0xF1);
	
	DISPLAY_ACTIVATE_VBAT;
	quicksleep(10000000);
	
	spi_send_recv(0xA1);
	spi_send_recv(0xC8);
	
	spi_send_recv(0xDA);
	spi_send_recv(0x20);
	
	spi_send_recv(0xAF);
}
/*Given to us in the lab*/
Given to us in the lab
Given to us in the lab
void display_init(void) {
        DISPLAY_CHANGE_TO_COMMAND_MODE;
	quicksleep(10);
	DISPLAY_ACTIVATE_VDD;
	quicksleep(1000000);
	spi_send_recv(0xAE);
	DISPLAY_ACTIVATE_RESET;
	quicksleep(10);
	DISPLAY_DO_NOT_RESET;
	quicksleep(10);
	spi_send_recv(0x8D);
	spi_send_recv(0x14);
	spi_send_recv(0xD9);
	spi_send_recv(0xF1);
	DISPLAY_ACTIVATE_VBAT;
	quicksleep(10000000);
	spi_send_recv(0xA1);
	spi_send_recv(0xC8);
	spi_send_recv(0xDA);
	spi_send_recv(0x20);
	spi_send_recv(0xAF);
}
void display_init ( void ) { DISPLAY_CHANGE_TO_COMMAND_MODE ; quicksleep ( 10 ) ; DISPLAY_ACTIVATE_VDD ; quicksleep ( 1000000 ) ; spi_send_recv ( 0xAE ) ; DISPLAY_ACTIVATE_RESET ; quicksleep ( 10 ) ; DISPLAY_DO_NOT_RESET ; quicksleep ( 10 ) ; spi_send_recv ( 0x8D ) ; spi_send_recv ( 0x14 ) ; spi_send_recv ( 0xD9 ) ; spi_send_recv ( 0xF1 ) ; DISPLAY_ACTIVATE_VBAT ; quicksleep ( 10000000 ) ; spi_send_recv ( 0xA1 ) ; spi_send_recv ( 0xC8 ) ; spi_send_recv ( 0xDA ) ; spi_send_recv ( 0x20 ) ; spi_send_recv ( 0xAF ) ; }
Given to us in the lab
Given to us in the lab