dmx_slave.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*********************************************************************
  2. *
  3. * DMX slave library for Fraise pic18f device
  4. *
  5. *********************************************************************
  6. * Author Date Comment
  7. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. * Antoine Rousseau may 2012 Original.
  9. ********************************************************************/
  10. /*
  11. # This program is free software; you can redistribute it and/or
  12. # modify it under the terms of the GNU General Public License
  13. # as published by the Free Software Foundation; either version 2
  14. # of the License, or (at your option) any later version.
  15. #
  16. # This program is distributed in the hope that it will be useful,
  17. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. # GNU General Public License for more details.
  20. # You should have received a copy of the GNU General Public License
  21. # along with this program; if not, write to the Free Software
  22. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  23. # MA 02110-1301, USA.
  24. */
  25. #ifndef _DMX_SLAVE_H_
  26. #define _DMX_SLAVE_H_
  27. void DMXSlaveInit();
  28. void DMXSlaveService();
  29. void DMXSlaveISR(); // to be declared in low ISR
  30. unsigned char DMXSlaveGet(unsigned int channel);
  31. unsigned int DMXSlaveGetMaxReceivedChannel(void); // calling this function resets the MaxReceivedChannel count.
  32. // Application must define following constant in config.h :
  33. //#define DMX_SLAVE_UART_PORT {1 or 2}
  34. #ifndef DMX_SLAVE_NBCHAN
  35. #define DMX_SLAVE_NBCHAN 128
  36. #endif
  37. #endif // _DMX_SLAVE_H_