#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>
Defines | |
| #define | IRC_START_POINT 0 |
| #define | IRC_END_POINT 29400 |
| #define | IRC_CORRECTION 35 |
Enumerations | |
| enum | { EMPTY = 0, INT_IR, 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 | print_irc () |
| void | print_meas () |
| void | meas_reorder () |
| void | serio_laser_send () |
| Send measured data through serial line. | |
| void | can_laser_send () |
| 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 IRC_CORRECTION 35 |
| #define IRC_END_POINT 29400 |
| #define IRC_START_POINT 0 |
| void can_laser_receive | ( | ) |
Receiving can messages from ppc.
| void can_laser_send | ( | ) |
Send measured data through CAN bus.


| 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.

| void init_engine | ( | void | ) |
Initialization of the laser`s beacon engine.
| void init_rot_timer | ( | void | ) |

| void isr_beacon | ( | void | ) |
| void isr_rotation_finished | ( | void | ) |
INTERRUPT SERVICE ROUTINES.
| int main | ( | void | ) |

| void meas_reorder | ( | ) |

| void print_irc | ( | ) |
| void print_meas | ( | ) |
| void serio_laser_send | ( | ) |
Send measured data through serial line.
| void unhandled_exception | ( | void | ) |
OTHER FUNCTIONS.

| cmd_des_t const cmd_des_help |
{0, 0, "HELP", "prints help for commands",
cmd_do_help, {(char*)&cmd_list}}
| cmd_io_t cmd_io_rs232_line |
| cmd_des_t const** cmd_list = cmd_list_default |
COMMAND PROCESSOR STUFFS.
| cmd_des_t const* cmd_list_default[] |
{
&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 |
{
pxml_arr:pxmc_main_arr,
pxml_cnt:sizeof(pxmc_main_arr)/sizeof(pxmc_main_arr[0])
}
1.7.1