/*****************************************************************************/
/* File: usercr.c (Cross Compiler) */
/* Author: Christopher Odenbach */
/* Date: Mon Dec 21 1998 */
/* Description: example of a global interrupt routine with IR-module */
/*****************************************************************************/
#include "bios.h"
#include "usercr.h"
#include "math.h"
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "can-ir.h"
#include "k-bus.h"
int32 ID_process[5];
void receive_IR(uint8 sender, uint8 length, uint8 *data)
{
int8 speed[2];
uint8 i;
switch ((char)data[0]) {
case 'D':
speed[1]=data[1]-127;
speed[0]=data[2]-127;
//printf("%c sets: %i %i\n",sender, speed[1], speed[0]);
mot_new_speed_2m(speed[1], speed[0]);
break;
case 'B':
printf("Du hast 'B' gedrueckt...\n");
/*bios_get_rev()*/
break;
default: /* ANYTHING ELSE */
printf("Received %i ",length);
tim_suspend_task(10);
printf("bytes ");
tim_suspend_task(10);
printf("from %c: ", sender);
for (i=0; i
Christopher Odenbach
1999-06-01