gpio.ls 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. 1 ; C Compiler for STM8 (COSMIC Software)
  2. 2 ; Parser V4.8.32 - 23 Mar 2010
  3. 3 ; Generator V4.3.4 - 23 Mar 2010
  4. 2729 ; 3 void GPIO_INIT(void)
  5. 2729 ; 4 {
  6. 2731 switch .text
  7. 2732 0000 _GPIO_INIT:
  8. 2736 ; 6 PA_DDR |= DDR_1;
  9. 2738 0000 72125002 bset _PA_DDR,#1
  10. 2739 ; 7 PA_CR1 |= CR1_1;
  11. 2741 0004 72125003 bset _PA_CR1,#1
  12. 2742 ; 8 PA_CR2 |= CR2_1;
  13. 2744 0008 72125004 bset _PA_CR2,#1
  14. 2745 ; 10 PA_DDR |= DDR_2;
  15. 2747 000c 72145002 bset _PA_DDR,#2
  16. 2748 ; 11 PA_CR1 |= CR1_2;
  17. 2750 0010 72145003 bset _PA_CR1,#2
  18. 2751 ; 12 PA_CR2 |= CR2_2;
  19. 2753 0014 72145004 bset _PA_CR2,#2
  20. 2754 ; 14 PA_DDR |= DDR_3;
  21. 2756 0018 72165002 bset _PA_DDR,#3
  22. 2757 ; 15 PA_CR1 |= CR1_3;
  23. 2759 001c 72165003 bset _PA_CR1,#3
  24. 2760 ; 16 PA_CR2 |= CR2_3;
  25. 2762 0020 72165004 bset _PA_CR2,#3
  26. 2763 ; 38 PD_DDR |= 0xFF;
  27. 2765 0024 c65011 ld a,_PD_DDR
  28. 2766 0027 aaff or a,#255
  29. 2767 0029 c75011 ld _PD_DDR,a
  30. 2768 ; 39 PD_CR1 |= 0xFF;
  31. 2770 002c c65012 ld a,_PD_CR1
  32. 2771 002f aaff or a,#255
  33. 2772 0031 c75012 ld _PD_CR1,a
  34. 2773 ; 40 PD_CR2 |= 0xFF;
  35. 2775 0034 c65013 ld a,_PD_CR2
  36. 2776 0037 aaff or a,#255
  37. 2777 0039 c75013 ld _PD_CR2,a
  38. 2778 ; 43 COLD = 0;
  39. 2780 003c 7219500f bres _COLD
  40. 2781 ; 44 HEAT = 0;
  41. 2783 0040 7213500f bres _HEAT
  42. 2784 ; 45 COLLECT_FAN = 0;
  43. 2786 0044 72135000 bres _COLLECT_FAN
  44. 2787 ; 46 COOL = 0;
  45. 2789 0048 72155000 bres _COOL
  46. 2790 ; 47 REST = 1;
  47. 2792 004c 72165000 bset _REST
  48. 2793 ; 51 }
  49. 2796 0050 81 ret
  50. 2809 xdef _GPIO_INIT
  51. 2828 end