SHARE
TWEET

Untitled

a guest Oct 17th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * definition.h
  3.  *
  4.  *  Created on: 19 paź 2016
  5.  *      Author: darek
  6.  */
  7.  
  8. #ifndef DEFINITION_H_
  9. #define DEFINITION_H_
  10.  
  11. //        sw_sliders
  12. #define  SW0 0x00000001
  13. #define  SW1 0x00000002
  14. #define  SW2 0x00000004
  15. #define  SW3 0x00000008
  16. #define  SW4 0x00000010
  17. #define  SW5 0x00000020
  18. #define  SW6 0x00000040
  19. #define  SW7 0x00000080
  20. #define  SW8 0x00000100
  21. #define  SW9 0x00000200
  22. #define  SW10 0x00000400
  23. #define  SW11 0x00000800
  24. #define  SW12 0x00001000
  25. #define  SW13 0x00002000
  26. #define  SW14 0x00004000
  27. #define  SW15 0x00008000
  28. #define  SW16 0x00010000
  29. #define  SW17 0x00020000
  30.  
  31. //      pushbuttons
  32. #define  KEY1 0x00000002
  33. #define  KEY2 0x00000004
  34. #define  KEY3 0x00000008
  35. #define  KEY4 0x00000010
  36.  
  37. //      leds
  38. #define  LED0 0x00000001
  39. #define  LED1 0x00000002
  40. #define  LED2 0x00000004
  41. #define  LED3 0x00000008
  42. #define  LED4 0x00000010
  43. #define  LED5 0x00000020
  44. #define  LED6 0x00000040
  45. #define  LED7 0x00000080
  46. #define  LED8 0x00000100
  47. #define  LED9 0x00000200
  48. #define  LED10 0x00000400
  49. #define  LED11 0x00000800
  50. #define  LED12 0x00001000
  51. #define  LED13 0x00002000
  52. #define  LED14 0x00004000
  53. #define  LED15 0x00008000
  54. #define  LED16 0x00010000
  55. #define  LED17 0x00020000
  56.  
  57. //      hex
  58. #define  SEGA 0x00001
  59. #define  SEGB 0x00002
  60. #define  SEGC 0x00004
  61. #define  SEGD 0x00008
  62. #define  SEGE 0x00010
  63. #define  SEGF 0x00020
  64. #define  SEGG 0x00040
  65.  
  66. //     hex - numbers
  67. #define HEX_ZERO SEGA | SEGB | SEGC | SEGD |SEGE | SEGF
  68. #define HEX_ONE  SEGB | SEGC
  69. #define HEX_TWO  SEGA | SEGB | SEGG | SEGE | SEGD
  70. #define HEX_THREE SEGA | SEGB | SEGC | SEGD | SEGG
  71. #define HEX_FOUR SEGF | SEGB | SEGG | SEGC
  72. #define HEX_FIVE SEGA | SEGF | SEGG | SEGC | SEGD
  73. #define HEX_SIX SEGA | SEGF | SEGG | SEGC | SEGD | SEGE
  74. #define HEX_SEVEN SEGA | SEGB | SEGC
  75. #define HEX_EIGHT SEGA | SEGB | SEGC | SEGD | SEGE | SEGF | SEGG
  76. #define HEX_NINE SEGA | SEGB | SEGC | SEGD | SEGF | SEGG
  77.  
  78. //      hex - characters
  79. #define HEX_A SEGA | SEGB | SEGC | SEGE | SEGF | SEGG
  80. #define HEX_B SEGC | SEGD | SEGE | SEGF | SEGG
  81. #define HEX_C SEGA | SEGD | SEGE | SEGF
  82. #define HEX_D SEGB | SEGC | SEGD | SEGE | SEGG
  83. #define HEX_E SEGA | SEGD | SEGE | SEGF | SEGG
  84. #define HEX_F SEGA | SEGE | SEGF | SEGG
  85. #define HEX_R SEGE | SEGG
  86.  
  87.  
  88. #endif /* DEFINITION_H_ */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top