target/unix/asuro_unix.c File Reference

This part attempts to simulate the ATmega8 pin port interface under UNIX. More...

#include "asuro_unix.h"
#include "asuro_unix_decode.h"
#include "asuro_defs.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <unistd.h>

Go to the source code of this file.

Functions

void AS_unix_sh_SIGALRM (int signo, siginfo_t *info, void *context)
 Call SIG_OUTPUT_COMPARE2 ISR and evaulate IO vector.
int AS_unix_prepareIo (int io_addr)
 This function is called just before any read or write access to the IO vector.
void AS_Init (void)
 Do some initialization stuff.

Variables

volatile int AS_unix_alarmCount = 0
volatile double AS_unix_simTime = 0.0
volatile int AS_unix_ioLock = 0


Detailed Description

This part attempts to simulate the ATmega8 pin port interface under UNIX.

Author:
Denis Martin
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

Definition in file asuro_unix.c.


Function Documentation

int AS_unix_prepareIo int  io_addr  ) 
 

This function is called just before any read or write access to the IO vector.

Any reactions on IO requests have to be handled here.

At the moment, the following is handled here:

  • Writes to the serial interface.

Parameters:
io_addr IO vector offset that is being accessed.
Returns:
Always io_addr

Definition at line 72 of file asuro_unix.c.

References AS_unix_ioLock, UCSRA, UCSRB, and UDR.


Generated on Fri May 12 10:11:15 2006 for simsuro by  doxygen 1.4.6