BrickUp API Service for Docker version.

mpr121.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. MPR121.h
  3. April 8, 2010
  4. by: Jim Lindblom
  5. updated: Author: LG
  6. This library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2.1 of the License, or (at your option) any later version.
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. // MPR121 Register Defines
  19. #define MHD_R 0x2B
  20. #define NHD_R 0x2C
  21. #define NCL_R 0x2D
  22. #define FDL_R 0x2E
  23. #define MHD_F 0x2F
  24. #define NHD_F 0x30
  25. #define NCL_F 0x31
  26. #define FDL_F 0x32
  27. #define ELE0_T 0x41
  28. #define ELE0_R 0x42
  29. #define ELE1_T 0x43
  30. #define ELE1_R 0x44
  31. #define ELE2_T 0x45
  32. #define ELE2_R 0x46
  33. #define ELE3_T 0x47
  34. #define ELE3_R 0x48
  35. #define ELE4_T 0x49
  36. #define ELE4_R 0x4A
  37. #define ELE5_T 0x4B
  38. #define ELE5_R 0x4C
  39. #define ELE6_T 0x4D
  40. #define ELE6_R 0x4E
  41. #define ELE7_T 0x4F
  42. #define ELE7_R 0x50
  43. #define ELE8_T 0x51
  44. #define ELE8_R 0x52
  45. #define ELE9_T 0x53
  46. #define ELE9_R 0x54
  47. #define ELE10_T 0x55
  48. #define ELE10_R 0x56
  49. #define ELE11_T 0x57
  50. #define ELE11_R 0x58
  51. #define FIL_CFG 0x5D
  52. #define ELE_CFG 0x5E
  53. #define GPIO_CTRL0 0x73
  54. #define GPIO_CTRL1 0x74
  55. #define GPIO_DATA 0x75
  56. #define GPIO_DIR 0x76
  57. #define GPIO_EN 0x77
  58. #define GPIO_SET 0x78
  59. #define GPIO_CLEAR 0x79
  60. #define GPIO_TOGGLE 0x7A
  61. #define ATO_CFG0 0x7B
  62. #define ATO_CFGU 0x7D
  63. #define ATO_CFGL 0x7E
  64. #define ATO_CFGT 0x7F
  65. // Global Constants
  66. #define TOU_THRESH 0x0F
  67. #define REL_THRESH 0x0A