fork(1) download
  1. #include <stdio.h>
  2.  
  3. unsigned PORTA = 0;
  4.  
  5. typedef struct
  6. {
  7. unsigned bit_0 : 1;
  8. unsigned bit_1 : 1;
  9. unsigned bit_2 : 1;
  10. unsigned bit_3 : 1;
  11. // ...
  12. } bitset_t;
  13.  
  14. #define LED ((bitset_t *)(&PORTA))->bit_3
  15. #define ON 1
  16. #define OFF 0
  17.  
  18. void foo()
  19. {
  20. LED = ON;
  21. }
  22.  
  23. int main(void) {
  24. foo();
  25. printf("%i\n", PORTA);
  26. // your code goes here
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
8