Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void out7seg(unsigned char c){
- switch(c) {
- case 0x0 :
- *GPIO_ODR_LOW = 0×0;
- break; /* optional */
- case 0x1 :
- *GPIO_ODR_LOW = 0×1;
- break; /* optional */
- case 0x2 :
- *GPIO_ODR_LOW = 0×2;
- break; /* optional */
- case 0x3 :
- *GPIO_ODR_LOW = 0×3;
- break; /* optional */
- case 0x4 :
- *GPIO_ODR_LOW = 0×4;
- break; /* optional */
- case 0x5 :
- *GPIO_ODR_LOW = 0×5;
- break; /* optional */
- case 0x6 :
- *GPIO_ODR_LOW = 0×6;
- break; /* optional */
- case 0x7 :
- *GPIO_ODR_LOW = 0×7;
- break; /* optional */
- case 0x8 :
- *GPIO_ODR_LOW = 0×8;
- break; /* optional */
- case 0x9 :
- *GPIO_ODR_LOW = 0×9;
- break; /* optional */
- case 0xA :
- *GPIO_ODR_LOW = 0×A;
- break; /* optional */
- case 0xB :
- *GPIO_ODR_LOW = 0×B;
- break; /* optional */
- case 0xC :
- *GPIO_ODR_LOW = 0×C;
- break; /* optional */
- case 0xD :
- *GPIO_ODR_LOW = 0×D;
- break; /* optional */
- case 0xE :
- *GPIO_ODR_LOW = 0×E;
- break; /* optional */
- case 0xF :
- *GPIO_ODR_LOW = 0×F;
- break; /* optional */
- /* you can have any number of case statements */
- default : /* Optional */
- statement(s);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement