Macros | Typedefs | Functions
mip_sdk_user_functions.h File Reference
#include "mip.h"
#include <time.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
Include dependency graph for mip_sdk_user_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MIP_COM_PORT_BUFFER_SIZE   0x200
 
#define MIP_USER_FUNCTION_ERROR   1
 
#define MIP_USER_FUNCTION_OK   0
 

Typedefs

typedef unsigned char Byte
 
typedef int ComPortHandle
 

Functions

u32 mip_sdk_get_time_ms ()
 
u16 mip_sdk_port_close (void *port_handle)
 
u16 mip_sdk_port_open (void **port_handle, const char *portstr, int baudrate)
 
u16 mip_sdk_port_read (void *port_handle, u8 *buffer, u32 num_bytes, u32 *bytes_read, u32 timeout_ms)
 
u32 mip_sdk_port_read_count (void *port_handle)
 
u16 mip_sdk_port_write (void *port_handle, u8 *buffer, u32 num_bytes, u32 *bytes_written, u32 timeout_ms)
 
u16 purge (ComPortHandle comPortHandle)
 

Macro Definition Documentation

#define MIP_COM_PORT_BUFFER_SIZE   0x200

Definition at line 37 of file mip_sdk_user_functions.h.

#define MIP_USER_FUNCTION_ERROR   1

Definition at line 35 of file mip_sdk_user_functions.h.

#define MIP_USER_FUNCTION_OK   0

Definition at line 34 of file mip_sdk_user_functions.h.

Typedef Documentation

typedef unsigned char Byte

Definition at line 32 of file mip_sdk_user_functions.h.

typedef int ComPortHandle

Definition at line 31 of file mip_sdk_user_functions.h.

Function Documentation

u32 mip_sdk_get_time_ms ( )

DESCRIPTION

Target-Specific Call to get the current time in milliseconds.

DETAILS

Parameters
[in]void*port_handle - target-specific port handle pointer (user needs to allocate memory for this)
Returns
Current time in milliseconds.

NOTES

1) This value should no roll-over in short periods of time (e.g. minutes)
2) Most systems have a millisecond counter that rolls-over every 32 bits
(e.g. 49.71 days roll-over period, with 1 millisecond LSB)
3) An absolute reference is not required since this function is
used for relative time-outs.
4) The user should copy the mip_sdk_user_functions.c file to their project directory and
edit it as needed to support their target operating system.

Definition at line 509 of file mip_sdk_user_functions.c.

u16 mip_sdk_port_close ( void *  port_handle)

DESCRIPTION

Target-Specific port close function

DETAILS

Parameters
[in]void*port_handle - target-specific port handle pointer (user needs to allocate memory for this)
Return values
MIP_USER_FUNCTION_ERRORWhen there is a problem closing the port.
MIP_USER_FUNCTION_OKThe close was successful.

NOTES

The user should copy the mip_sdk_user_functions.c file to their project directory and
edit it as needed to support their target operating system.

Definition at line 349 of file mip_sdk_user_functions.c.

u16 mip_sdk_port_open ( void **  port_handle,
const char *  portstr,
int  baudrate 
)

Definition at line 68 of file mip_sdk_user_functions.c.

u16 mip_sdk_port_read ( void *  port_handle,
u8 *  buffer,
u32  num_bytes,
u32 *  bytes_read,
u32  timeout_ms 
)

DESCRIPTION

Target-Specific Port Write Function.

DETAILS

Parameters
[in]void*port_handle - target-specific port handle pointer (user needs to allocate memory for this)
[in]u8*buffer - buffer containing num_bytes of data
[in]u32num_bytes - the number of bytes to write to the port
[out]u32*bytes_read - the number of bytes actually read from the device
[in]u32timeout_ms - the read timeout
Return values
MIP_USER_FUNCTION_ERRORWhen there is a problem communicating with the port.
MIP_USER_FUNCTION_OKThe read was successful.

NOTES

The user should copy the mip_sdk_user_functions.c file to their project directory and
edit it as needed to support their target operating system.

Definition at line 435 of file mip_sdk_user_functions.c.

u32 mip_sdk_port_read_count ( void *  port_handle)

DESCRIPTION

Target-Specific Function to Get the Number of Bytes Waiting on the Port.

DETAILS

Parameters
[in]void*port_handle - target-specific port handle pointer (user needs to allocate memory for this)
Returns
Number of bytes waiting on the port,
0, if there is an error.

NOTES

The user should copy the mip_sdk_user_functions.c file to their project directory and
edit it as needed to support their target operating system.

Definition at line 472 of file mip_sdk_user_functions.c.

u16 mip_sdk_port_write ( void *  port_handle,
u8 *  buffer,
u32  num_bytes,
u32 *  bytes_written,
u32  timeout_ms 
)

DESCRIPTION

Target-Specific Port Write Function.

DETAILS

Parameters
[in]void*port_handle - target-specific port handle pointer (user needs to allocate memory for this)
[in]u8*buffer - buffer containing num_bytes of data
[in]u32num_bytes - the number of bytes to write to the port
[out]u32*bytes_written - the number of bytes actually written to the port
[in]u32timeout_ms - the write timeout
Return values
MIP_USER_FUNCTION_ERRORWhen there is a problem communicating with the port.
MIP_USER_FUNCTION_OKThe write was successful.

NOTES

The user should copy the mip_sdk_user_functions.c file to their project directory and
edit it as needed to support their target operating system.

Definition at line 390 of file mip_sdk_user_functions.c.

u16 purge ( ComPortHandle  comPortHandle)

Definition at line 38 of file mip_sdk_user_functions.c.



microstrain_mips
Author(s): Brian Bingham
autogenerated on Sun Dec 22 2019 03:54:45