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.

44 lines
852 B

  1. From 0f8df09a8008eed8a7ac0c6400bce523014ff770 Mon Sep 17 00:00:00 2001
  2. From: Michael Heimpold <mhei@heimpold.de>
  3. Date: Mon, 18 Jul 2016 22:45:04 +0200
  4. Subject: [PATCH 16/16] Add additional baudrates
  5. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
  6. ---
  7. dio.c | 20 ++++++++++++++++++++
  8. 1 file changed, 20 insertions(+)
  9. diff --git a/dio.c b/dio.c
  10. index 1a130a2..a4e8e7d 100644
  11. --- a/dio.c
  12. +++ b/dio.c
  13. @@ -522,6 +522,26 @@ PHP_FUNCTION(dio_tcsetattr)
  14. /* assign to correct values... */
  15. switch (Baud_Rate) {
  16. +#ifdef B460800
  17. + case 460800:
  18. + BAUD = B460800;
  19. + break;
  20. +#endif
  21. +#ifdef B230400
  22. + case 230400:
  23. + BAUD = B230400;
  24. + break;
  25. +#endif
  26. +#ifdef B115200
  27. + case 115200:
  28. + BAUD = B115200;
  29. + break;
  30. +#endif
  31. +#ifdef B57600
  32. + case 57600:
  33. + BAUD = B57600;
  34. + break;
  35. +#endif
  36. case 38400:
  37. BAUD = B38400;
  38. break;
  39. --
  40. 2.5.0