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.

DMX_Interface.cpp 439B

123456789101112131415161718192021
  1. #include <stdio.h>
  2. //#include "UART.h"
  3. #include <wiringPiSPI.h>
  4. #include "SPI_DMX.h"
  5. # define measure_length(type) ((char *)(&type+1)-(char*)(&type))
  6. /* demo.c: My first C program on a Linux */
  7. int main(void)
  8. {
  9. printf("Hello! This is a test prgoram.\n");
  10. SPI_DMX spi1(0);
  11. spi1.nice();
  12. unsigned char message[4] = {0x55,0x66,0x55,0x66};
  13. //uart.TX_Bytes(message,measure_length(message));
  14. spi1.TX_Bytes(message,4);
  15. return 0;
  16. }