|
@@ -13,7 +13,7 @@
|
|
|
#include "wonx_include/comm.h"
|
|
|
|
|
|
#include "wonx_configure.h"
|
|
|
-#include "Wonx.h"
|
|
|
+#include "WonX.h"
|
|
|
#include "etc.h"
|
|
|
|
|
|
/*****************************************************************************/
|
|
@@ -40,28 +40,28 @@ void comm_open(void)
|
|
|
{
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_open() : \n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_open", "Serial port has already opened.");
|
|
|
+ WonX_Error("comm_open", "Serial port has already opened.");
|
|
|
|
|
|
WWSerialPort_ON(ww_serial_port);
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_open() : return value = none\n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -70,28 +70,28 @@ void comm_close(void)
|
|
|
{
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_close() : \n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_close", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_close", "Serial port is not opened.");
|
|
|
|
|
|
WWSerialPort_OFF(ww_serial_port);
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_close() : return value = none\n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -155,18 +155,18 @@ int comm_send_char(unsigned char c)
|
|
|
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_send_char() : character = 0x%02x\n", (int)c);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_send_char", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_send_char", "Serial port is not opened.");
|
|
|
|
|
|
printf("output to serial port : ");
|
|
|
comm_output(c);
|
|
@@ -174,13 +174,13 @@ int comm_send_char(unsigned char c)
|
|
|
fflush(stdout);
|
|
|
ret = 0;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_send_char() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -191,31 +191,31 @@ int comm_receive_char(void)
|
|
|
int c;
|
|
|
int ret;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_receive_char() : \n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_receive_char", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_receive_char", "Serial port is not opened.");
|
|
|
|
|
|
c = comm_input(WWSerialPort_GetReceiveTimeout(ww_serial_port));
|
|
|
|
|
|
if (c == -1) ret = ERR_SIO_TIMEOUT;
|
|
|
else ret = c;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_receive_char() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -226,31 +226,31 @@ int comm_receive_with_timeout(int timeout)
|
|
|
int c;
|
|
|
int ret;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_receive_with_timeout() : timeout = %d\n", timeout);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_receive_with_timeout", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_receive_with_timeout", "Serial port is not opened.");
|
|
|
|
|
|
c = comm_input(timeout);
|
|
|
|
|
|
if (c == -1) ret = ERR_SIO_TIMEOUT;
|
|
|
else ret = c;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_receive_with_timeout() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -261,18 +261,18 @@ int comm_send_string(char * string)
|
|
|
int ret;
|
|
|
int i;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_send_string() : string = %s\n", string);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_send_string", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_send_string", "Serial port is not opened.");
|
|
|
|
|
|
printf("output to serial port : ");
|
|
|
for (i = 0; string[i]; i++) {
|
|
@@ -282,13 +282,13 @@ int comm_send_string(char * string)
|
|
|
fflush(stdout);
|
|
|
ret = 0;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_send_string() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -299,18 +299,18 @@ int comm_send_block(void * buffer, int size)
|
|
|
int ret;
|
|
|
int i;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_send_block() : buffer = %p, size = %d\n", buffer, size);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_send_block", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_send_block", "Serial port is not opened.");
|
|
|
|
|
|
printf("output to serial port : ");
|
|
|
for (i = 0; i < size; i++) {
|
|
@@ -320,13 +320,13 @@ int comm_send_block(void * buffer, int size)
|
|
|
fflush(stdout);
|
|
|
ret = 0;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_send_block() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -338,19 +338,19 @@ int comm_receive_block(void * buffer, int size)
|
|
|
int c;
|
|
|
int i;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_receive_block() : buffer = %p, size = %d\n",
|
|
|
buffer, size);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (!WWSerialPort_IsON(ww_serial_port))
|
|
|
- Wonx_Error("comm_receive_block", "Serial port is not opened.");
|
|
|
+ WonX_Error("comm_receive_block", "Serial port is not opened.");
|
|
|
|
|
|
ret = 0;
|
|
|
for (i = 0; i < size; i++) {
|
|
@@ -362,13 +362,13 @@ int comm_receive_block(void * buffer, int size)
|
|
|
((char *)buffer)[i] = c;
|
|
|
}
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_receive_block() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -377,26 +377,26 @@ void comm_set_timeout(int recv_timeout, int send_timeout)
|
|
|
{
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_set_timeout() : receive_timeout = %d, send_timeout = %d\n", recv_timeout, send_timeout);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
WWSerialPort_SetReceiveTimeout(ww_serial_port, recv_timeout);
|
|
|
WWSerialPort_SetSendTimeout( ww_serial_port, send_timeout);
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_set_timeout() : return value = none\n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -405,29 +405,29 @@ void comm_set_baudrate(int baudrate)
|
|
|
{
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_set_baudrate() : baudrate = %d\n", baudrate);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
switch (baudrate) {
|
|
|
case COMM_SPEED_9600: WWSerialPort_SetBaudrate9600( ww_serial_port); break;
|
|
|
case COMM_SPEED_38400: WWSerialPort_SetBaudrate38400(ww_serial_port); break;
|
|
|
- default: Wonx_Error("comm_set_baudrate", "Invalid baudrate");
|
|
|
+ default: WonX_Error("comm_set_baudrate", "Invalid baudrate");
|
|
|
}
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_set_baudrate() : return value = none\n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -437,29 +437,29 @@ int comm_get_baudrate(void)
|
|
|
WWSerialPort ww_serial_port;
|
|
|
int ret = 0;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_get_baudrate() : \n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
if (WWSerialPort_IsBaudrate9600(ww_serial_port))
|
|
|
ret = COMM_SPEED_9600;
|
|
|
else if (WWSerialPort_IsBaudrate38400(ww_serial_port))
|
|
|
ret = COMM_SPEED_38400;
|
|
|
- else Wonx_Error("comm_get_baudrate", "Invalid baudrate");
|
|
|
+ else WonX_Error("comm_get_baudrate", "Invalid baudrate");
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_get_baudrate() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -468,25 +468,25 @@ void comm_set_cancel_key(unsigned int pattern)
|
|
|
{
|
|
|
WWSerialPort ww_serial_port;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_set_cancel_key() : pattern = %u\n", (int)pattern);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
WWSerialPort_SetCancelKey(ww_serial_port, pattern);
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_set_cancel_key() : return value = none\n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return;
|
|
|
}
|
|
@@ -496,26 +496,26 @@ unsigned int comm_get_cancel_key(void)
|
|
|
WWSerialPort ww_serial_port;
|
|
|
unsigned int ret;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_get_cancel_key() : \n");
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
/* ここに処理を書く */
|
|
|
ret = WWSerialPort_GetCancelKey(ww_serial_port);
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_get_cancel_key() : return value = %u\n", (int)ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|
|
@@ -525,28 +525,28 @@ int comm_xmodem(void * xmodem)
|
|
|
WWSerialPort ww_serial_port;
|
|
|
int ret;
|
|
|
|
|
|
- if (!Wonx_IsCreated()) Wonx_Create();
|
|
|
+ if (!WonX_IsCreated()) WonX_Create();
|
|
|
|
|
|
/* タイマを一時停止する */
|
|
|
- UNIXTimer_Pause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Pause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
printf("call : comm_xmodem() : xmodem = %p\n", xmodem);
|
|
|
fflush(stdout);
|
|
|
|
|
|
- ww_serial_port = WonxSerialPort_GetWWSerialPort(Wonx_GetWonxSerialPort());
|
|
|
+ ww_serial_port = WonXSerialPort_GetWWSerialPort(WonX_GetWonXSerialPort());
|
|
|
|
|
|
/* 未サポート */
|
|
|
printf("call : comm_xmodem() : not supported.\n");
|
|
|
fflush(stdout);
|
|
|
ret = 0;
|
|
|
|
|
|
- WonxDisplay_Sync(Wonx_GetWonxDisplay());
|
|
|
+ WonXDisplay_Sync(WonX_GetWonXDisplay());
|
|
|
|
|
|
printf("call : comm_xmodem() : return value = %d\n", ret);
|
|
|
fflush(stdout);
|
|
|
|
|
|
/* タイマをもとに戻す */
|
|
|
- UNIXTimer_Unpause(WonxSystem_GetUNIXTimer(Wonx_GetWonxSystem()));
|
|
|
+ UNIXTimer_Unpause(WonXSystem_GetUNIXTimer(WonX_GetWonXSystem()));
|
|
|
|
|
|
return (ret);
|
|
|
}
|