Go to the documentation of this file.00001
00012 #ifndef _MIP_SDK_USER_FUNCTIONS_H
00013 #define _MIP_SDK_USER_FUNCTIONS_H
00014
00015
00016 #include "mip.h"
00017 #include <time.h>
00018 #include <sys/ioctl.h>
00019 #include <termios.h>
00020 #include <fcntl.h>
00021 #include <errno.h>
00022 #include <assert.h>
00023 #include <stdio.h>
00024 #include <string.h>
00025 #include <stdlib.h>
00026 #include <unistd.h>
00027
00028
00030
00031 typedef int ComPortHandle;
00032 typedef unsigned char Byte;
00033
00034 #define MIP_USER_FUNCTION_OK 0
00035 #define MIP_USER_FUNCTION_ERROR 1
00036
00037 #define MIP_COM_PORT_BUFFER_SIZE 0x200
00038
00039
00040
00041 u16 purge(ComPortHandle comPortHandle);
00042
00043 u16 mip_sdk_port_open(void **port_handle, const char *portstr, int baudrate);
00044
00045 u16 mip_sdk_port_close(void *port_handle);
00046
00047 u16 mip_sdk_port_write(void *port_handle, u8 *buffer, u32 num_bytes, u32 *bytes_written, u32 timeout_ms);
00048
00049 u16 mip_sdk_port_read(void *port_handle, u8 *buffer, u32 num_bytes, u32 *bytes_read, u32 timeout_ms);
00050
00051 u32 mip_sdk_port_read_count(void *port_handle);
00052
00053 u32 mip_sdk_get_time_ms();
00054
00055 #endif