Defines | Enumerations | Functions | Variables

laser-rotaring.c File Reference

#include <stdio.h>
#include <types.h>
#include <cpu_def.h>
#include <mcu_regs.h>
#include <system_def.h>
#include <string.h>
#include <boot_fn.h>
#include <periph/sci_rs232.h>
#include <cmd_proc.h>
#include <stdlib.h>
#include <pxmc.h>
#include <pxmcbsp.h>
#include <h8s2638h.h>
#include <malloc.h>
#include "laser-io.h"
#include <can_ids.h>
#include <candriver.h>
#include <canOpenDriver.h>
Include dependency graph for laser-rotaring.c:

Defines

#define IRC_START_POINT   0
#define DIRECTION   (1)
#define USE_IRC
#define SEND_AFTER_REFLECTION
#define LASER_OPTO_CORRECTION   485

Enumerations

enum  { EMPTY = 0, INT_IR, INT_LASER, SET_REF_DONE }

Functions

void unhandled_exception (void)
 OTHER FUNCTIONS.
void init ()
 init - shadow registers, outputs.
void isr_rotation_finished (void)
 INTERRUPT SERVICE ROUTINES.
void isr_beacon (void)
void init_rot_timer (void)
void init_engine (void)
 Initialization of the laser`s beacon engine.
void engine_run (char speed)
void engine_stop ()
void print_meas ()
void serio_laser_send ()
 Send measured data through serial line.
void can_laser_send2 ()
 Send measured data through CAN bus.
void can_laser_receive ()
 Receiving can messages from ppc.
int main ()

Variables

cmd_des_t const ** cmd_list = cmd_list_default
 COMMAND PROCESSOR STUFFS.
cmd_des_t const cmd_des_help
cmd_des_t * cmd_stm_default [1]
cmd_des_t const * cmd_list_default []
pxmc_state_t mcs0
 ENGINE STUFFS.
pxmc_state_t mcs1
pxmc_state_t * pxmc_main_arr [] = {&mcs0,&mcs1}
pxmc_state_list_t pxmc_main_list
__u16 las_can_ids [4] = {CAN_LAS1, CAN_LAS2, CAN_LAS3, CAN_LAS4}
cmd_io_t cmd_io_rs232_line

Define Documentation

#define DIRECTION   (1)
#define IRC_START_POINT   0
#define LASER_OPTO_CORRECTION   485
#define SEND_AFTER_REFLECTION
#define USE_IRC

Enumeration Type Documentation

anonymous enum
Enumerator:
EMPTY 
INT_IR 
INT_LASER 
SET_REF_DONE 

Function Documentation

void can_laser_receive (  ) 

Receiving can messages from ppc.

Here is the call graph for this function:

Here is the caller graph for this function:

void can_laser_send2 (  ) 

Send measured data through CAN bus.

Here is the caller graph for this function:

void engine_run ( char  speed  ) 

Here is the caller graph for this function:

void engine_stop (  ) 

Here is the caller graph for this function:

void init ( void   ) 

init - shadow registers, outputs.

Initializes P1 and P3 shadow registers, sets PJ.1, PJ.2, PJ.3 LED as outputs, initialises interrupt vector.

Here is the call graph for this function:

void init_engine ( void   ) 

Initialization of the laser`s beacon engine.

Here is the caller graph for this function:

void init_rot_timer ( void   ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void isr_beacon ( void   ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void isr_rotation_finished ( void   ) 

INTERRUPT SERVICE ROUTINES.

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( void   ) 

Here is the call graph for this function:

void print_meas (  ) 

Here is the caller graph for this function:

void serio_laser_send (  ) 

Send measured data through serial line.

Here is the caller graph for this function:

void unhandled_exception ( void   ) 

OTHER FUNCTIONS.

Here is the call graph for this function:


Variable Documentation

cmd_des_t const cmd_des_help
Initial value:
 {0, 0, "HELP", "prints help for commands",
                        cmd_do_help, {(char*)&cmd_list}}
cmd_des_t const ** cmd_list = cmd_list_default

COMMAND PROCESSOR STUFFS.

cmd_des_t const* cmd_list_default[]
Initial value:
 {
        &cmd_des_help,
        CMD_DES_INCLUDE_SUBLIST(cmd_stm_default),
        NULL
}
cmd_des_t* cmd_stm_default[1]
__u16 las_can_ids[4] = {CAN_LAS1, CAN_LAS2, CAN_LAS3, CAN_LAS4}
pxmc_state_t mcs0

ENGINE STUFFS.

pxmc_state_t mcs1
pxmc_state_t* pxmc_main_arr[] = {&mcs0,&mcs1}
pxmc_state_list_t pxmc_main_list
Initial value:
 {
        pxml_arr:pxmc_main_arr,
        pxml_cnt:sizeof(pxmc_main_arr)/sizeof(pxmc_main_arr[0])
}