Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

Cable interface


Detailed Description

By cable interface we mean ME<->PC connection usually provided via serial cable (but can be also IrDA or Bluetooth).

Cable interface can be used for:

To use cable interface ME must support following AT commands, Ref. 07.07:

The cable interface operation is done by repeating cycles consisting of:

  1. write SMS = send request
  2. read + delete SMS = read answer and free SMS memory position

Warning:
Internal inode() use - content will be destroyed.

Defines


Define Documentation

#define CABLE_CLEAR_APPS
 

Remove all applications.

The structure is:

  1. CABLE_CLEAR_APPS - 1 byte

#define CABLE_CREATE_DIR
 

create_dir() wrapper.

The structure is:

Returns:
b32 inode pointer of error

#define CABLE_CREATE_FILE
 

create_file() wrapper.

The structure is:

Returns:
b32 inode pointer of error

#define CABLE_DELETE_INODE
 

delete_inode() wrapper.

The structure is:

#define CABLE_FILE_APPEND
 

mc_append() wrapper.

Note:
Data should be 128 bytes max.
The structure is:

#define CABLE_FILE_FIND
 

mc_find() wrapper.

The structure is:

  • CABLE_FILE_FIND - 1 byte
  • path string, '\0' terminated
  • name string, '\0' terminated

Returns:
<0 not found, >0 u32 inode pointer, u32 get_len(), u32 get_len_raw().

#define CABLE_FILE_READ
 

mc_read() wrapper.

The structure is:

  • CABLE_FILE_READ - 1 byte
  • file_id - 4 bytes
  • length of data - 1 byte
  • position in file - 4 bytes

Returns:
data

#define CABLE_GET_INODE
 

get_inode() wrapper.

The structure is:

Returns:
inode content

#define CABLE_INFO
 

Get Turbo OS information - version, serial number.

The structure is:

  1. CABLE_INFO - 1 byte

#define CABLE_LOCK_TURBO
 

Remove all applications.

The structure is:

  1. CABLE_LOCK_TURBO - 1 byte

#define CABLE_MC_INFO
 

mc_detect() wrapper.

The structure is:

Returns:
u8 id, u8 number of blocks, u16 number of pages, u32 root()

#define CABLE_READ_BLOCK
 

Read file system block.

The structure is:

Returns:
data of lenght len

#define CABLE_RESET_DEFAULT
 

Remove all applications.

The structure is:

  1. CABLE_RESET_DEFAULT - 1 byte

#define CABLE_SET_INODE
 

set_inode() cable interface wrapper.

The structure is:

  • CABLE_SET_INODE - 1 byte
  • inode_id - 4 bytes
  • inode content - sizeof(Inode) bytes

#define CABLE_UPLOAD_APP
 

General tag indicating application upload. Used in combination with CABLE_UPLOAD_APP_START, CABLE_UPLOAD_APP_CONT, CABLE_UPLOAD_APP_END.

Usage is:

  1. CABLE_UPLOAD_APP_START
  2. repeat of CABLE_UPLOAD_APP_CONT
  3. CABLE_UPLOAD_APP_END

#define CABLE_UPLOAD_APP_CONT
 

Upload part of application.

Structure is:

Returns:
NO_ERROR or ERR_BAD_FILE, ERR_NO_APP_SLOT, ERR_NO_PROGMEM, ERR_NO_RAM.

#define CABLE_UPLOAD_APP_END
 

Finnish aplication upload.

Structure is:

Returns:
NO_ERROR, ERR_NO_RAM, ERR_NO_EEPROM, ERR_BAD_FILE (crc error).

#define CABLE_UPLOAD_APP_START
 

Indicates beginning of application upload.

Structure is:

Returns:
NO_ERROR or ERR_NO_RAM.

#define CABLE_WRITE_BLOCK
 

Write file system block.

The structure is:


Copyright © 2004-2006 BLADOX
Turbo version 1.2