python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

plat_interface.h File Reference

plat_interface.h File Reference

PyMite's Porting Interface. More...

Go to the source code of this file.

Functions

PmReturn_t plat_init (void)
 Initializes the platform as needed by the routines in the platform implementation file.
PmReturn_t plat_deinit (void)
 De-initializes the platform after the VM is done running.
uint8_t plat_memGetByte (PmMemSpace_t memspace, uint8_t const **paddr)
 Returns the byte at the given address in memspace.
PmReturn_t plat_getByte (uint8_t *b)
 Receives one byte from the default connection, usually UART0 on a target device or stdio on the desktop.
PmReturn_t plat_putByte (uint8_t b)
 Sends one byte out on the default connection, usually UART0 on a target device or stdio on the desktop.
PmReturn_t plat_getMsTicks (uint32_t *r_ticks)
 Gets the number of timer ticks that have passed since system start.
void plat_reportError (PmReturn_t result)
 Reports an exception or other error that caused the thread to quit.

Detailed Description

PyMite's Porting Interface.

Definition in file plat_interface.h.


Function Documentation

PmReturn_t plat_deinit ( void   )

De-initializes the platform after the VM is done running.

Definition at line 56 of file plat.cpp.

PmReturn_t plat_getByte ( uint8_t *  b )

Receives one byte from the default connection, usually UART0 on a target device or stdio on the desktop.

Definition at line 91 of file plat.cpp.

PmReturn_t plat_getMsTicks ( uint32_t *  r_ticks )

Gets the number of timer ticks that have passed since system start.

Definition at line 119 of file plat.cpp.

PmReturn_t plat_init ( void   )

Initializes the platform as needed by the routines in the platform implementation file.

Definition at line 45 of file plat.cpp.

uint8_t plat_memGetByte ( PmMemSpace_t  memspace,
uint8_t const **  paddr 
)

Returns the byte at the given address in memspace.

Increments the address (just like getc and read(1)) to make image loading work (recursively).

PORT: fill in getByte for each memspace in the system; call sys_error for invalid memspaces.

Parameters:
memspacememory space/type
paddrptr to address
Returns:
byte from memory. paddr - points to the next byte

Definition at line 66 of file plat.cpp.

PmReturn_t plat_putByte ( uint8_t  b )

Sends one byte out on the default connection, usually UART0 on a target device or stdio on the desktop.

Definition at line 109 of file plat.cpp.

void plat_reportError ( PmReturn_t  result )

Reports an exception or other error that caused the thread to quit.

Definition at line 128 of file plat.cpp.