comm.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*****************************************************************************/
  2. /* ここから */
  3. /*****************************************************************************/
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include "sys/comm.h"
  7. #include "Wonx.h"
  8. /*****************************************************************************/
  9. /* 互換関数の定義 */
  10. /*****************************************************************************/
  11. /*
  12. * Xサーバとの同期の整合性がとれなくなるなどの問題が考えられるので,
  13. * 互換関数の内部は UNIXTimer_Pause(), UNIXTimer_Unpause() でくくり,
  14. * タイマ割り込みを一時停止して処理を行う.また,unpause するまえに,
  15. * かならず sync するようにする.
  16. */
  17. /*
  18. * タイマの一時停止の2重解除の問題が出てくるので,
  19. * 互換関数から互換関数を呼んではいけない.
  20. * (一時停止はネストされるが,いちおう)
  21. * 似たような処理をする関数の場合は,必ず static な別関数に処理をまとめ,
  22. * そっちを呼び出すようにすること.
  23. * 引数の表示の問題もあるしね.
  24. */
  25. void comm_open(void)
  26. {}
  27. void comm_close(void)
  28. {}
  29. int comm_send_char(unsigned char byte)
  30. {
  31. return (0);
  32. }
  33. int comm_receive_char(void)
  34. {
  35. return (0);
  36. }
  37. int comm_receive_with_timeout(int timeout)
  38. {
  39. return (0);
  40. }
  41. int comm_send_string(char * string)
  42. {
  43. return (0);
  44. }
  45. int comm_send_block(void * buffer, int size)
  46. {
  47. return (0);
  48. }
  49. int comm_receive_block(void * buffer, int size)
  50. {
  51. return (0);
  52. }
  53. void comm_set_timeout(int receive_timeout, int send_timeout)
  54. {
  55. }
  56. void comm_set_baudrate(int speed)
  57. {
  58. }
  59. int comm_get_baudrate(void)
  60. {
  61. return (0);
  62. }
  63. void comm_set_cancel_key(unsigned int pattern)
  64. {
  65. }
  66. unsigned int comm_get_cancel_key(void)
  67. {
  68. return (0);
  69. }
  70. #if 0
  71. int comm_xmodem(void * xmodem)
  72. {
  73. return (0);
  74. }
  75. #endif
  76. /*****************************************************************************/
  77. /* ここまで */
  78. /*****************************************************************************/
  79. /*****************************************************************************/
  80. /* End of File. */
  81. /*****************************************************************************/