plat.c File Reference

#include <stdio.h>
#include <mc1322x.h>
#include <board.h>
#include "pm.h"

Go to the source code of this file.

Defines

#define __FILE_ID__   0x52
#define INC   767
#define MOD   9999
#define SAMP   UCON_SAMP_8X
#define COUNT_MODE   1
#define PRIME_SRC   0xe
#define LEN   1
#define PLAT_TIME_PER_TICK_USEC   1000

Functions

void tmr0_isr (void)
PmReturn_t plat_init (void)
PmReturn_t plat_deinit (void)
uint8_t plat_memGetByte (PmMemSpace_t memspace, uint8_t const **paddr)
PmReturn_t plat_getByte (uint8_t *b)
PmReturn_t plat_putByte (uint8_t b)
PmReturn_t plat_getMsTicks (uint32_t *r_ticks)
void plat_reportError (PmReturn_t result)


Detailed Description

PyMite - A flyweight Python interpreter for 8-bit and larger microcontrollers. Copyright 2002 Dean Hall. All rights reserved. PyMite is offered through one of two licenses: commercial or open-source. See the LICENSE file at the root of this package for licensing details.

some sections based on code (C) COPYRIGHT 2008 STMicroelectronics

Definition in file plat.c.


Function Documentation

PmReturn_t plat_deinit ( void   ) 

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

Definition at line 79 of file plat.c.

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 120 of file plat.c.

PmReturn_t plat_getMsTicks ( uint32_t r_ticks  ) 

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

Definition at line 138 of file plat.c.

PmReturn_t plat_init ( void   ) 

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

Definition at line 46 of file plat.c.

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:
memspace memory space/type
paddr ptr to address
Returns:
byte from memory. paddr - points to the next byte

Definition at line 96 of file plat.c.

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 129 of file plat.c.

void plat_reportError ( PmReturn_t  result  ) 

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

Definition at line 149 of file plat.c.


Generated on Mon Oct 18 07:40:48 2010 for Python-on-a-chip by  doxygen 1.5.9