Global Interrupt

02 Oct 2010

Hi,

i have some problem with this thing, let we call global interrupt.

i did something same as Inaki in this link http://www.robozes.com/inaki/dproject/report.pdf

he used AVR and camera C3088 to do his work, so i'm trying to connect C3088 to LPC1768.

in his code it writes:

 

...

  if(strcmp(command,"PHOTO")==0){
        createheader(header,352,244);
        createinfoheader(infoheader,352,244);
		usart_putnumchars(header, 14);
		usart_putnumchars(infoheader, 40);
		sendtable();
		write_register(0x11, 0X10);
		cli();
		photo();
		sei();
		write_register(0x11, 0X00);
}

...  

and i change it to:

 

 

...
 
while (1){
        readline(line);
        sscanf(line,"%s",command);
        if (strcmp(command, "PHOTO")==0){
            createheader(header,352,244);
            createinfoheader(infoheader,352,244);
            pcputnumchars(header, 14);
            pcputnumchars(infoheader, 40);
            sendtable();
            writeregister(0x11, 0x10);
            //global interrupt in  <------------ this is problem
            photo();
            //global interrupt off <------------ this is problem
            writeregister(0x11, 0x00);
        }
    }

...  

knowing cli() is trigger to call global interrupt, and sei() to close the global interrupt, what i must write into my code?

 

-Wasesasegara