Simple single-color 8x8x8 LED Cube with AVRs
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.

serial.h 755B

1234567891011121314151617181920212223242526
  1. /*
  2. * POSIX compatible serial port library
  3. * Uses 8 databits, no parity, 1 stop bit, no handshaking
  4. * By: Thomas Buck <taucher.bodensee@gmail.com>
  5. * Visit: www.xythobuz.org
  6. */
  7. // Use POSIX Baud constants (B2400, B9600...)
  8. #define BAUD B38400
  9. // Searchterm for ports in unix
  10. #define SEARCH "tty."
  11. // Open the serial port. Return 0 on success, -1 on error
  12. int serialOpen(char *port);
  13. // Write to port. Returns number of characters sent, -1 on error
  14. ssize_t serialWrite(char *data, size_t length);
  15. // Read from port. Return number of characters read, 0 if none available, -1 on error
  16. ssize_t serialRead(char *data, size_t length);
  17. // Close the serial Port
  18. void serialClose(void);
  19. // String array with serial port names
  20. char** getSerialPorts(void);