Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------------
- // C main line
- //----------------------------------------------------------------------------
- #include <m8c.h>
- #include "PSoCAPI.h"
- void main(void)
- {
- debut: if((PRT0DR & 0x10) == 0x10)
- PRT1DR = PRT1DR | 0x02;
- else
- PRT1DR = PRT1DR & 0xFD;
- if((PRT0DR & 0x20) == 0x20)
- PRT1DR = PRT1DR | 0x04;
- else
- PRT1DR = PRT1DR & 0xFB;
- if((PRT0DR & 0x01) == 0x00)
- goto label1;
- if((PRT0DR & 0x02) == 0x02)
- goto label1;
- if((PRT0DR & 0x04) == 0x00)
- goto label2;
- if((PRT0DR & 0x08) == 0x08)
- goto label2;
- label3: if((PRT0DR & 0x20) == 0x20)
- {
- PRT1DR = PRT1DR | 0x04;
- PRT1DR = PRT1DR & 0xFE;
- }
- goto debut;
- label2: if((PRT0DR & 0x10) == 0x10)
- label1: {PRT1DR = PRT1DR | 0x01;
- goto debut;
- }else{
- goto label3;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement