You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 12 година
пре 12 година
пре 12 година
пре 12 година
пре 12 година
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * mcp3422.h:
  3. * Extend wiringPi with the MCP3422/3/4 I2C ADC chip
  4. ***********************************************************************
  5. * This file is part of wiringPi:
  6. * https://github.com/WiringPi/WiringPi/
  7. *
  8. * wiringPi is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as
  10. * published by the Free Software Foundation, either version 3 of the
  11. * License, or (at your option) any later version.
  12. *
  13. * wiringPi is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with wiringPi.
  20. * If not, see <http://www.gnu.org/licenses/>.
  21. ***********************************************************************
  22. */
  23. #define MCP3422_SR_240 0
  24. #define MCP3422_SR_60 1
  25. #define MCP3422_SR_15 2
  26. #define MCP3422_SR_3_75 3
  27. #define MCP3422_GAIN_1 0
  28. #define MCP3422_GAIN_2 1
  29. #define MCP3422_GAIN_4 2
  30. #define MCP3422_GAIN_8 3
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. extern int mcp3422Setup (int pinBase, int i2cAddress, int sampleRate, int gain) ;
  35. #ifdef __cplusplus
  36. }
  37. #endif