26.07.2014 Views

proposta de utilização do sistema operacional windows ce ... - UTFPR

proposta de utilização do sistema operacional windows ce ... - UTFPR

proposta de utilização do sistema operacional windows ce ... - UTFPR

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sizeof(msg1), &written, NULL);<br />

sizeof(msg1), &written, NULL);<br />

(hPort1,&buffer_rec,5,&dwBytesTransferred,NULL);<br />

}<br />

break;<br />

}<br />

WriteFile(hPort1,msg1,<br />

i++;<br />

}<br />

printf(" ");<br />

WriteFile(hPort1,"A",<br />

Sleep(200);<br />

//Re<strong>ce</strong>be PV<br />

printf(" ");<br />

ReadFile<br />

i=0;<br />

while(buffer_rec[i]!='A')<br />

i++;<br />

buffer_rec[i]='\0';<br />

PV=(float)atoi(buffer_rec);<br />

printf("\nPV=%.2f",PV);<br />

}<br />

if(opcao_manual==3)<br />

{<br />

mo<strong>do</strong>=4;<br />

break;<br />

}<br />

}<br />

}<br />

break;<br />

case(4)://mo<strong>do</strong> menu<br />

{<br />

mo<strong>do</strong>=Menu_principal();<br />

if(mo<strong>do</strong>==1)<br />

{<br />

Menu_ajuste();<br />

scanf("%d",&opcao);<br />

}<br />

if(mo<strong>do</strong>==2)//mo<strong>do</strong> automatico<br />

{<br />

mo<strong>do</strong>=2;<br />

}<br />

if(mo<strong>do</strong>==3)//mo<strong>do</strong> manual<br />

{<br />

Menu_manual();<br />

}<br />

if(mo<strong>do</strong>==4)<br />

menu_inicial=3;<br />

}<br />

break;<br />

109

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!