From: Michal Sojka Date: Sat, 29 Dec 2012 22:15:42 +0000 (+0100) Subject: Remove minibee app X-Git-Url: https://rtime.felk.cvut.cz/gitweb/sysless.git/commitdiff_plain/80dd5073f6d8ce555d3c27465108b2bafe89e93b Remove minibee app This application does not build after removal of ebb lib in the previous commit. --- diff --git a/board/arm/lpceurobot/Makefile.omk b/board/arm/lpceurobot/Makefile.omk index bdd7d21..6061ee2 100644 --- a/board/arm/lpceurobot/Makefile.omk +++ b/board/arm/lpceurobot/Makefile.omk @@ -1,3 +1,3 @@ # -*- makefile -*- -SUBDIRS = defines libs test app +SUBDIRS = defines libs test diff --git a/board/arm/lpceurobot/app/Makefile b/board/arm/lpceurobot/app/Makefile deleted file mode 100644 index 76b56fd..0000000 --- a/board/arm/lpceurobot/app/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# Generic directory or leaf node makefile for OCERA make framework - -ifndef MAKERULES_DIR -MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) ) -endif - -ifeq ($(MAKERULES_DIR),) -all : default -.DEFAULT:: - @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n" -else -include $(MAKERULES_DIR)/Makefile.rules -endif - diff --git a/board/arm/lpceurobot/app/Makefile.omk b/board/arm/lpceurobot/app/Makefile.omk deleted file mode 100644 index 1e7493c..0000000 --- a/board/arm/lpceurobot/app/Makefile.omk +++ /dev/null @@ -1,3 +0,0 @@ -# -*- makefile -*- - -SUBDIRS := minibee diff --git a/board/arm/lpceurobot/app/minibee/Doxyfile b/board/arm/lpceurobot/app/minibee/Doxyfile deleted file mode 100644 index 1bdcc88..0000000 --- a/board/arm/lpceurobot/app/minibee/Doxyfile +++ /dev/null @@ -1,299 +0,0 @@ -# Doxyfile 1.5.4 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Minibee - ZigBee radio Module" -PROJECT_NUMBER = 1 -OUTPUT_DIRECTORY = ./doc -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class " \ - "The $name widget " \ - "The $name file " \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = /home/jirka/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 1 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -TYPEDEF_HIDES_STRUCT = NO -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ./ -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY \ - *.F90 \ - *.F \ - *.VHD \ - *.VHDL \ - *.C \ - *.H \ - *.tlh \ - *.diff \ - *.patch \ - *.moc \ - *.xpm \ - *.dox -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = minibee.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = YES -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/board/arm/lpceurobot/app/minibee/MC1319x.c b/board/arm/lpceurobot/app/minibee/MC1319x.c deleted file mode 100644 index 0687492..0000000 --- a/board/arm/lpceurobot/app/minibee/MC1319x.c +++ /dev/null @@ -1,404 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - - -/** - * @file MC1319x.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Library for MC13xx2 freescale radio - * - */ - - - -#include "spi.h" -#include "MC1319x.h" -#include "MC1319xdef.h" - - -#ifdef LPC - #include /* LPC21xx definitions */ - #include - #include -#endif - -struct Message *rcvBuf; ///< Pointer to recieve Message buffer -struct Message *sndBuf; ///< Pointer to send Message buffer - - -uint8_t MC_RecievePaket(struct Message *msg); - - - -/** - * Interupt handling. Here is reading IRQ register and deremine what generates IRQ - * @note This function is platform depended - */ - -#ifdef ATmega88 - ISR(INT0_vect) -#endif -#ifdef LPC - void ext_isr(void) -#endif - -{ - uint16_t dummy =0; - -#ifdef LPC - EXTINT |= EXTINT_EINT3_m ; // Acknowledge interupt source -#endif - - deb_led_on(LEDR); -// send_rs_str("ISR\n"); // printout that ISR occurs - - uint16_t mask = spi_Read(IRQ_STATUS); - - if((mask & IRQ_STATUS_RX_RCVD_IRQm) == IRQ_STATUS_RX_RCVD_IRQm) // Recieved data - { - CLR(RXTXEN); // clear - - dummy = (spi_Read(RX_STATUS) & 0x7F); - - if(!(mask & 1)) - { - MC_RecievePaket(rcvBuf); - goto ISR_END; - } - - rcvBuf->done = 1; - rcvBuf->len = dummy; - - spi_Read_Buf(rcvBuf); - } - - - if((mask & IRQ_STATUS_TX_SENT_IRQm) == IRQ_STATUS_TX_SENT_IRQm) // Data send done - { - CLR(RXTXEN); // clear - sndBuf->done = 1; - } - - -// if((mask & IRQ_STATUS_PLL_LOCK_IRQm) == IRQ_STATUS_PLL_LOCK_IRQm); //todo , lost PLL LOCK -// if((mask & IRQ_STATUS_RAM_ADR_ERRm) == IRQ_STATUS_RAM_ADR_ERRm) ; //todo, RAM buffer overrun -// if((mask & IRQ_STATUS_ARB_BUSY_ERRm) == IRQ_STATUS_ARB_BUSY_ERRm) ; //todo -// if((mask & IRQ_STATUS_SRTM_DATA_ERRm) == IRQ_STATUS_SRTM_DATA_ERRm); //todo Streaming data requested/aviable -// if((mask & IRQ_STATUS_ATTN_IRQm) == IRQ_STATUS_ATTN_IRQm); //todo ATTN asserted -// if((mask & IRQ_STATUS_DOZE_IRQm) == IRQ_STATUS_DOZE_IRQm); // todo timer event - return to idle from doze -// if((mask & IRQ_STATUS_CCA_IRQm) == IRQ_STATUS_CCA_IRQm); //todo CCA/ED done -// if((mask & IRQ_STATUS_TMR1_IRQm) == IRQ_STATUS_TMR1_IRQm);//todo timer 1 match -// if((mask & IRQ_STATUS_TMR2_IRQm) == IRQ_STATUS_TMR2_IRQm);//todo timer 2 match -// if((mask & IRQ_STATUS_TMR3_IRQm) == IRQ_STATUS_TMR3_IRQm);//todo timer 3 match -// if((mask & IRQ_STATUS_TMR4_IRQm) == IRQ_STATUS_TMR4_IRQm);//todo timer 4 match -// if((mask & IRQ_STATUS_CCAm) == IRQ_STATUS_CCAm); // output of the comparation of CCA -// if((mask & IRQ_STATUS_CRC_VALIDm) == IRQ_STATUS_CRC_VALIDm); // recieved correct CRC - -ISR_END: - -#ifdef LPC - VICVectAddr = 0; // acknowledge ISR in VIC -#endif - deb_led_off(LEDR); -} -/** - * Delay function. - * @note Should be removed in future - */ -void dummy_wait() -{ - unsigned int wait = 5000000; - while(--wait); -} - - - -/** - * Woodoo function inicialize radio. I hove no idea what it is doing, but its VERY inportatnt. - */ -void MC_Woodoo(void) -{ - spi_ReadModifiWrite(0x08, 0x0001, 0xFFFF); - spi_ReadModifiWrite(0x08, 0x0010, 0xFFFF); - spi_ReadModifiWrite(0x11, 0x0000, 0xFCFF); - spi_ReadModifiWrite(0x06, 0x4000, 0xFFFF); -} - - -/** - * Reset the radio to it default state and inicialize it - */ -uint8_t MC_Reset(void) // generate reset on MC13192x -{ - - - disable_IRQ_pin(); - - // reset MC radio - SET(ATTN); - CLR(RXTXEN); - CLR(RST); - dummy_wait(); - SET(RST); - - - // wait for IRQ - while( (IO0PIN & (1<> 8); - - enable_IRQ_pin(); - - return val; -} - -/** - * Sends the packed stored in Message structure - * @param *msg ponter to Message structure - */ -uint8_t MC_SendPaket(struct Message *msg) -{ - - sndBuf = msg; - msg->done = 0; - - CLR(RXTXEN); //switch off radio output - - spi_ReadModifiWrite(CONTROL_A, CONTROL_A_TX_SENTm | CONTROL_A_RX_RCVDm \ - ,~(CONTROL_A_TX_STRMm|CONTROL_A_RX_STRMm|CONTROL_A_TMR_TRIG_ENm|CONTROL_A_CCA_XCVR_CLRm) ); - // selects CCA as ED type and sets transerciver to CCA/ED mode and alows to generate CCA interrupt - - spi_Write(TX_PKT_CTL, TX_PKT_CTL_PKT_LENGHT(msg->len)); // write the number data bytes in message + 2 - spi_Write_Buf (msg); // recursive write data to MC radio - - spi_ReadModifiWrite(CONTROL_A, CONTROL_A_CCA_XCVR_PMTXm, 0xFFFF); // Sets TX mode - SET(RXTXEN); // starts transmit - - return 0; -} - -/** - * Resend the packed stored in radio transmit buffer - * @param *msg pointer to Message structure - * @note Not sure if it is working - */ -uint8_t MC_ReSendPaket(struct Message *msg) -{ - sndBuf = msg; - msg->done = 0; - - CLR(RXTXEN); //switch off radio output - - spi_ReadModifiWrite(CONTROL_A, CONTROL_A_TX_SENTm | CONTROL_A_RX_RCVDm \ - ,~(CONTROL_A_TX_STRMm|CONTROL_A_RX_STRMm|CONTROL_A_TMR_TRIG_ENm|CONTROL_A_CCA_XCVR_CLRm) ); - // selects CCA as ED type and sets transerciver to CCA/ED mode and alows to generate CCA interrupt - spi_Write(TX_PKT_CTL, TX_PKT_CTL_PKT_LENGHT(msg->len)); // recursive write data to MC radio - - spi_ReadModifiWrite(CONTROL_A, CONTROL_A_CCA_XCVR_PMTXm, 0xFFFF); // Sets TX mode - - SET(RXTXEN); // starts transmit - - return 0; -} - - -/** - * Reads packet stored in radio buffer - * @param *msg pointer to Message structure - */ -uint8_t MC_RecievePaket(struct Message *msg) -{ - uint16_t dummy; - - rcvBuf = msg; - msg->done = 0; - - CLR(RXTXEN); //switch off radio output - - spi_ReadModifiWrite(CONTROL_A, CONTROL_A_TX_SENTm | CONTROL_A_RX_RCVDm | CONTROL_A_CCA_XCVR_PMRXm \ - ,~(CONTROL_A_TX_STRMm|CONTROL_A_RX_STRMm|CONTROL_A_TMR_TRIG_ENm|CONTROL_A_CCA_XCVR_CLRm) ); - // selects CCA as ED type and sets transerciver to CCA/ED mode and alows to generate CCA interrupt - - dummy = (spi_Read(RX_STATUS) & 0x7F); - SET(RXTXEN); // starts recieving - - return 0; -} - - -/** - * Returns radio identification - */ -uint16_t MC_WhoAmI(void) -{ - return spi_Read(CHIP_ID); -} - -/** - * Sets radio frequency channel - * @param channel specifies frequency output (1~16) - * @note See definions from MC1319xdef.h - */ -uint8_t MC_SetChannel(uint8_t channel) -{ - uint16_t int_div = 0; - uint16_t lo1_num = 0; - - switch(channel) - { - case 1: int_div = LO1_INT_DIV_CH1; - lo1_num = LO1_NUM_CH1; - break; - - case 2: int_div = LO1_INT_DIV_CH2; - lo1_num = LO1_NUM_CH2; - break; - - case 3: int_div = LO1_INT_DIV_CH3; - lo1_num = LO1_NUM_CH3; - break; - - case 4: int_div = LO1_INT_DIV_CH4; - lo1_num = LO1_NUM_CH4; - break; - - case 5: int_div = LO1_INT_DIV_CH5; - lo1_num = LO1_NUM_CH5; - break; - - case 6: int_div = LO1_INT_DIV_CH6; - lo1_num = LO1_NUM_CH6; - break; - - case 7: int_div = LO1_INT_DIV_CH7; - lo1_num = LO1_NUM_CH7; - break; - - case 8: int_div = LO1_INT_DIV_CH8; - lo1_num = LO1_NUM_CH8; - break; - - case 9: int_div = LO1_INT_DIV_CH9; - lo1_num = LO1_NUM_CH9; - break; - - case 10: int_div = LO1_INT_DIV_CH10; - lo1_num = LO1_NUM_CH10; - break; - - case 11: int_div = LO1_INT_DIV_CH11; - lo1_num = LO1_NUM_CH11; - break; - - case 12: int_div = LO1_INT_DIV_CH12; - lo1_num = LO1_NUM_CH12; - break; - - case 13: int_div = LO1_INT_DIV_CH13; - lo1_num = LO1_NUM_CH13; - break; - - case 14: int_div = LO1_INT_DIV_CH14; - lo1_num = LO1_NUM_CH14; - break; - - case 15: int_div = LO1_INT_DIV_CH15; - lo1_num = LO1_NUM_CH15; - break; - - case 16: int_div = LO1_INT_DIV_CH16; - lo1_num = LO1_NUM_CH16; - break; - - default: return 0; - } - - spi_Write(LO1_NUM,lo1_num); - spi_ReadModifiWrite(LO1_INT_DIV,int_div,0xFF00); - - return 1; -} - -/** - * Sets CLKO pin to specified clock output - * @param tick specifies frequency output - * @param enable enable or disable output - * @note Use definions from MC1319xdef.h - */ -uint8_t MC_SetClko(uint16_t tick, uint8_t enable) -{ - - spi_ReadModifiWrite(CLKO_CTL,tick,~(CLKO_CTL_CLKO_CLRm)); - - if (enable == 1) - { - spi_ReadModifiWrite(CONTROL_C,CONTROL_C_CLKO_ENm,0xFFFF); - } - else - { - spi_ReadModifiWrite(CONTROL_C,0,~(CONTROL_C_CLKO_ENm)); - } - - return 0; -} - -/** - * Im not remeber what is this doing. - */ -uint8_t MC_SetPa(uint8_t val) -{ - spi_ReadModifiWrite(PA_LVL,(uint16_t)val,0xFFFF); - return 0; -} diff --git a/board/arm/lpceurobot/app/minibee/MC1319x.h b/board/arm/lpceurobot/app/minibee/MC1319x.h deleted file mode 100644 index 2938a4f..0000000 --- a/board/arm/lpceurobot/app/minibee/MC1319x.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// -/** - * @file MC1319x.h - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Function prototypes for MC1319x.c - * - */ - - -#ifndef MC1319x_H -#define MC1319x_H - - -#include "MC1319xdef.h" - - -uint8_t MC_Reset(void); // generate reset on MC1319x -uint16_t MC_WhoAmI(void); // returns ID of MC1319x -uint8_t MC_ED(void); // measure ED on current channel -uint8_t MC_SendPaket(struct Message *msg); // send message wia zigbee -uint8_t MC_ReSend(struct Message *msg); // send message wia zigbee -uint8_t MC_RecievePaket(struct Message *msg); // Initate recieving packet -uint8_t MC_SetClko(uint16_t tick, uint8_t enable); // sets and enables CLKO -uint8_t MC_SetPa(uint8_t val); // sets PA level -void dummy_wait(); // dummy wait cycle - -void ext_isr(void) __attribute__ ((interrupt)); ///< protype if ISR function, platform dependent - -#endif //MC1319x_H diff --git a/board/arm/lpceurobot/app/minibee/MC1319xdef.h b/board/arm/lpceurobot/app/minibee/MC1319xdef.h deleted file mode 100644 index d62c457..0000000 --- a/board/arm/lpceurobot/app/minibee/MC1319xdef.h +++ /dev/null @@ -1,344 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - - -/** - * @file MC1319xdef.h - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Radio register definition and platform specific definitions. - * - */ - -#ifndef MC1319XDEF_H -#define MC1319XDEF_H - -// define proctype - -//#define ATmega88 ///< Select ATmega88 as master MCU -#define LPC ///< Select LPC as master MCU - - -//------------- procesor ATmega88 specific definitons ------------ - -// control pins -#ifdef ATmega88 - - #define IRQ PD2 ///< Inverted , input, ISR request - #define CE PD4 ///< slave select , #CE on MC radio - #define ATTN PD5 ///< Inverted , output - #define RXTXEN PD6 ///< enable RX or TX operations - #define RST PD7 ///< Inverted , output - #define DD_MOSI PB3 ///< SPI - master output - #define DD_MISO PB4 ///< SPI - master input - #define DD_SCK PB5 ///< SPI - master clock - - - - #define CLR(x) \ ///< clear pin command - { PORTD &= ~(1<<(x)); } - - - #define SET(x) \ ///< clear pin command - { PORTD |= (1<<(x)); } -#endif - -#ifdef LPC - -#include - - #define IRQ 9 ///< P0.9 Inverted , input, ISR request - #define CE 7 ///< P0.7 slave select , #CE on MC radio - #define ATTN 11 ///< P0.11 Inverted , output - #define RXTXEN 8 ///< P0.8 enable RX or TX operations - #define RST 12 ///< P0.12 Inverted , output - #define MOSI 6 ///< P0.6 SPI - master output - #define MISO 5 ///< P0.5 SPI - master input - #define SCK 4 ///< P0.4 SPI - master clock - - /// clear pin command - #define CLR(x) \ - { IO0CLR |= (1<<(x)); } - - /// set pin command - #define SET(x) \ - { IO0SET |= (1<<(x)); } - -#endif - - -// ------------------ message definitons ---------------- - - - - -/// Radio message structure -struct Message{ - uint8_t done; ///< Send / recieve flag - uint8_t error; ///< error flag - ocured during send or recieveng - uint8_t len; ///< data length t osend (0 to 125) - uint8_t data[25]; ///< data -} ; - - - - - - -//-------------- MC1319x definitions ----------------------------- - - -// SPI read and write mask comands -#define RD 0x80 -#define WR 0x00 - -// Reset register -#define RESET 0x00 - -// Recieve buffer register -#define RX_PKT_RAM 0x01 - -// Transmit buffer register -#define TX_PKT_RAM 0x02 - -// Transmit control register -#define TX_PKT_CTL 0x03 - #define TX_PKT_CTL_RAM2_SELm 15 - #define TX_PKT_CTL_PKT_LENGHT(x) ( x + 2 ) - -// CCA treshold register -#define CCA_THRESH 0x04 - -// IRQ mas register -#define IRQ_MASK 0x05 - #define IRQ_MASK_ATTNm 0x8000 - #define IRQ_MASK_RAM_ADDRm 0x1000 - #define IRQ_MASK_ARB_BUSYm 0x0800 - #define IRQ_MASK_STRM_DATAm 0x0400 - #define IRQ_MASK_PPL_LOCKm 0x0200 - #define IRQ_MASK_ACOMAm 0x0100 - #define IRQ_MASK_DOZEm 0x0010 - #define IRQ_MASK_TMR4m 0x0008 - #define IRQ_MASK_TMR3m 0x0004 - #define IRQ_MASK_TMR2m 0x0002 - #define IRQ_MASK_TMR1m 0x0001 - - -#define CONTROL_A 0x06 - #define CONTROL_A_TX_STRMm 0x1000 - #define CONTROL_A_RX_STRMm 0x0800 - #define CONTROL_A_CCAm 0x0400 - #define CONTROL_A_TX_SENTm 0x0200 - #define CONTROL_A_RX_RCVDm 0x0100 - #define CONTROL_A_TMR_TRIG_ENm 0x0080 - #define CONTROL_A_CCA_TYPE1m 0x0020 - #define CONTROL_A_CCA_TYPE0m 0x0010 - #define CONTROL_A_CCA_CCAm CONTROL_A_CCA_TYPE0m - #define CONTROL_A_CCA_EDm CONTROL_A_CCA_TYPE1m - #define CONTROL_A_CCA_XCVR_SEG1m 0x0002 - #define CONTROL_A_CCA_XCVR_SEG0m 0x0001 - #define CONTROL_A_CCA_XCVR_IDLEm 0 - #define CONTROL_A_CCA_XCVR_CCAEDm CONTROL_A_CCA_XCVR_SEG0m - #define CONTROL_A_CCA_XCVR_PMRXm CONTROL_A_CCA_XCVR_SEG1m - #define CONTROL_A_CCA_XCVR_PMTXm (CONTROL_A_CCA_XCVR_SEG1m | CONTROL_A_CCA_XCVR_SEG0m) - #define CONTROL_A_CCA_XCVR_CLRm (CONTROL_A_CCA_XCVR_SEG1m | CONTROL_A_CCA_XCVR_SEG0m) - -#define CONTROL_B 0x07 - #define CONTROL_B_TMR_LOADm 0x8000 - #define CONTROL_B_MISO_HIZ_ENm 0x0800 - #define CONTROL_B_CLKO_DOZE_ENm 0x0200 - #define CONTROL_B_TX_DONEm 0x0080 - #define CONTROL_B_RX_DONEm 0x0040 - #define CONTROL_B_USE_STM_MODEm 0x0020 - #define CONTROL_B_HIB_ENm 0x0002 - #define CONTROL_B_DOZE_ENm 0x0001 - -#define PA_ENABLE 0x08 - #define PA_ENABLE_PA_ENm 0x8000 - -#define CONTROL_C 0x09 - #define CONTROL_C_GPIO_ALT_ENm 0x0080 - #define CONTROL_C_CLKO_ENm 0x0020 - #define CONTROL_C_TMR_PRESCALE2m 0x0004 - #define CONTROL_C_TMR_PRESCALE1m 0x0002 - #define CONTROL_C_TMR_PRESCALE0m 0x0001 - -#define CLKO_CTL 0x0A - #define CLKO_CTL_CLKO_RATE2m 0x0004 - #define CLKO_CTL_CLKO_RATE1m 0x0002 - #define CLKO_CTL_CLKO_RATE0m 0x0001 - #define CLKO_CTL_CLKO_16Mm 0x00 - #define CLKO_CTL_CLKO_8Mm CLKO_CTL_CLKO_RATE0m - #define CLKO_CTL_CLKO_4Mm CLKO_CTL_CLKO_RATE1m - #define CLKO_CTL_CLKO_2Mm (CLKO_CTL_CLKO_RATE0m | CLKO_CTL_CLKO_RATE1m) - #define CLKO_CTL_CLKO_1Mm CLKO_CTL_CLKO_RATE2m - #define CLKO_CTL_CLKO_62Km (CLKO_CTL_CLKO_RATE0m | CLKO_CTL_CLKO_RATE2m) - #define CLKO_CTL_CLKO_32Km (CLKO_CTL_CLKO_RATE1m | CLKO_CTL_CLKO_RATE2m) - #define CLKO_CTL_CLKO_16Km (CLKO_CTL_CLKO_RATE0m | CLKO_CTL_CLKO_RATE1m| CLKO_CTL_CLKO_RATE2m) - - #define CLKO_CTL_CLKO_ONm 0x01 // additional definition, not in register - #define CLKO_CTL_CLKO_OFFm 0x00 // additional definition, not in register - #define CLKO_CTL_CLKO_CLRm (CLKO_CTL_CLKO_RATE0m | CLKO_CTL_CLKO_RATE1m| CLKO_CTL_CLKO_RATE2m) - - -#define GPIO_DIR 0x0B // not finished -#define GPIO_DATA_OUT 0x0C // not finished - - -#define LO1_INT_DIV 0x0F - #define LO1_INT_DIV_CH1 0x95 - #define LO1_INT_DIV_CH2 0x95 - #define LO1_INT_DIV_CH3 0x95 - #define LO1_INT_DIV_CH4 0x96 - #define LO1_INT_DIV_CH5 0x96 - #define LO1_INT_DIV_CH6 0x96 - #define LO1_INT_DIV_CH7 0x97 - #define LO1_INT_DIV_CH8 0x97 - #define LO1_INT_DIV_CH9 0x97 - #define LO1_INT_DIV_CH10 0x98 - #define LO1_INT_DIV_CH11 0x98 - #define LO1_INT_DIV_CH12 0x98 - #define LO1_INT_DIV_CH13 0x99 - #define LO1_INT_DIV_CH14 0x99 - #define LO1_INT_DIV_CH15 0x99 - #define LO1_INT_DIV_CH16 0x9A - - -#define LO1_NUM 0x10 - #define LO1_NUM_CH1 0x5000 - #define LO1_NUM_CH2 0xA000 - #define LO1_NUM_CH3 0xF000 - #define LO1_NUM_CH4 0x4000 - #define LO1_NUM_CH5 0x9000 - #define LO1_NUM_CH6 0xE000 - #define LO1_NUM_CH7 0x3000 - #define LO1_NUM_CH8 0x8000 - #define LO1_NUM_CH9 0xD000 - #define LO1_NUM_CH10 0x2000 - #define LO1_NUM_CH11 0x7000 - #define LO1_NUM_CH12 0xC000 - #define LO1_NUM_CH13 0x1000 - #define LO1_NUM_CH14 0x6000 - #define LO1_NUM_CH15 0xB000 - #define LO1_NUM_CH16 0x0000 - - -// channel decimal definiton -#define ZB_CH1 1 -#define ZB_CH2 2 -#define ZB_CH3 3 -#define ZB_CH4 4 -#define ZB_CH5 5 -#define ZB_CH6 6 -#define ZB_CH7 7 -#define ZB_CH8 8 -#define ZB_CH9 9 -#define ZB_CH10 10 -#define ZB_CH11 11 -#define ZB_CH12 12 -#define ZB_CH13 13 -#define ZB_CH14 14 -#define ZB_CH15 15 -#define ZB_CH16 16 - -// channel 802.15.4 definiton -#define ZB_CH802_11 ZB_CH1 -#define ZB_CH802_12 ZB_CH2 -#define ZB_CH802_13 ZB_CH3 -#define ZB_CH802_14 ZB_CH4 -#define ZB_CH802_15 ZB_CH5 -#define ZB_CH802_16 ZB_CH6 -#define ZB_CH802_17 ZB_CH7 -#define ZB_CH802_18 ZB_CH8 -#define ZB_CH802_19 ZB_CH9 -#define ZB_CH802_20 ZB_CH10 -#define ZB_CH802_21 ZB_CH11 -#define ZB_CH802_22 ZB_CH12 -#define ZB_CH802_23 ZB_CH13 -#define ZB_CH802_24 ZB_CH14 -#define ZB_CH802_25 ZB_CH15 -#define ZB_CH802_26 ZB_CH16 - - - - -#define PA_LVL 0x12// not finished - -#define TMR_CMP1_A 0x1B// not finished -#define TMR_CMP1_B 0x1C// not finished - -#define TMR_CMP2_A 0x1D// not finished -#define TMR_CMP2_B 0x1E// not finished - -#define TMR_CMP3_A 0x1F// not finished -#define TMR_CMP3_B 0x20// not finished - -#define TMR_CMP4_A 0x21// not finished -#define TMR_CMP4_B 0x22// not finished - -#define TC2_PRIME 0x23// not finished - -#define IRQ_STATUS 0x24 - #define IRQ_STATUS_PLL_LOCK_IRQm 0x8000 - #define IRQ_STATUS_RAM_ADR_ERRm 0x4000 - #define IRQ_STATUS_ARB_BUSY_ERRm 0x2000 - #define IRQ_STATUS_SRTM_DATA_ERRm 0x1000 - #define IRQ_STATUS_ATTN_IRQm 0x0400 - #define IRQ_STATUS_DOZE_IRQm 0x0200 - #define IRQ_STATUS_TMR1_IRQm 0x0100 - #define IRQ_STATUS_RX_RCVD_IRQm 0x0080 - #define IRQ_STATUS_TX_SENT_IRQm 0x0040 - #define IRQ_STATUS_CCA_IRQm 0x0020 - #define IRQ_STATUS_TMR3_IRQm 0x0010 - #define IRQ_STATUS_TMR4_IRQm 0x0008 - #define IRQ_STATUS_TMR2_IRQm 0x0004 - #define IRQ_STATUS_CCAm 0x0002 - #define IRQ_STATUS_CRC_VALIDm 0x0001 - -#define RST_IND 0x25 - #define RST_IND_RESET_INDm 0x0080 - - -#define CURRENT_TIME_A 0x26 -#define CURRENT_TIME_B 0x27 - -#define GPIO_DATA_IN 0x28 // not finished - -#define CHIP_ID 0x2C // not finished - -#define RX_STATUS 0x2D - -#define TIMESTAMP_A 0x2E -#define TIMESTAMP_B 0x2F - -#define BER_ENABLE 0x30 - #define BER_ENABLE_BER_EN 0x8000 - - - - - -#endif - - - - - - - - - - - - - - - - - - - diff --git a/board/arm/lpceurobot/app/minibee/Makefile b/board/arm/lpceurobot/app/minibee/Makefile deleted file mode 100644 index 76b56fd..0000000 --- a/board/arm/lpceurobot/app/minibee/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# Generic directory or leaf node makefile for OCERA make framework - -ifndef MAKERULES_DIR -MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) ) -endif - -ifeq ($(MAKERULES_DIR),) -all : default -.DEFAULT:: - @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n" -else -include $(MAKERULES_DIR)/Makefile.rules -endif - diff --git a/board/arm/lpceurobot/app/minibee/Makefile.omk b/board/arm/lpceurobot/app/minibee/Makefile.omk deleted file mode 100644 index 90b9fdd..0000000 --- a/board/arm/lpceurobot/app/minibee/Makefile.omk +++ /dev/null @@ -1,10 +0,0 @@ -# -*- makefile -*- -# eb_blink je nazev programu, pod timto navzem bude systemem prekladan -bin_PROGRAMS = minibee - - -# za nazev_programu_SOURCES se davaji vsechny C zdrojaky, ktere se budou kompilovat -minibee_SOURCES = main.c spi_LPC.c MC1319x.c uart_minibee.c - - -minibee_LIBS = ebb diff --git a/board/arm/lpceurobot/app/minibee/main.c b/board/arm/lpceurobot/app/minibee/main.c deleted file mode 100644 index 1a2c4c6..0000000 --- a/board/arm/lpceurobot/app/minibee/main.c +++ /dev/null @@ -1,381 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - - -/** - * \mainpage Zigbee radio MC13192 or MC13202 - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * \section Introduction - * This code provides same sample how to use MC13xx2 radio in packet mode. - * The basic libraries for testing are writen mostly platform independent. - * See the function description. In some function is noted that use some platform - * depended parts whis should be modified. Originaly this code was developed for - * MC13192 radio, but now we use MC13202 radio which is almost fully compatible. - * - * MC1319x.c - is mostly platform independent, see notes inside. This library - * contains basic function which contains funcion for send, recieve, set clko, - * read ID, set frequency and do energy detect. - * - * MC1319xdef.h - contains register definions and bit masks for MC13xxx radio - * - * spi.h - platform independent. Contains function prototypes and definition - * SPI_SPEED for setting SPI speed in Hz. - * - * spi_LPC.c - platform dependent. Contains inicializing function for SPI channel, - * all other used pins and installs ISR. - * - * uart_minibee.h - platform independent. Function prototypes for uart communication - * - * uart_minibee.c - particulary platform dependent. Some part of this code must be ported - * for new platform. - * - * Porting to another platform: - * For another platform you must implement your own SPI function, - * set pins and install ISR. It must support the prototypes functions - * which is defined in spi.h. You also must implement your - * function for uart communication (see uart_minibee.c). - * - * The last tested platform is LpcEurobot which is ARM7 micproporcesor LPC2119. - * It also use eurobot ebb library for UART communication for ARM7. Older platform - * was AVR which is no longer supported due to no platform for testing. In this code - * is added spi_avr.c which is not fully ported. - * - * @note Known issues: - * 1) IRQ edge sensive - in this code are parts where is ISR at IRQ pins is disabled. - * If this code didnt fully acknowledge IRQ in radio the renewed ISR will not recognise - * IRQ request. If this occurs the main MCU must be reseted. - * Solutions: - * a) comment line 73 in spi_LPC.c - in commnent is *** - * b) move all code to ISR and never disable ISR on IRQ pin - recomended - */ - -/** - * @file main.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Demo application demonstrating use of MC1319x library. - * This file provides simply how-to use MC1319x library. - * From main function is called init function of SPI and UART. - * After sucessfull inicialize it tries read chip ID and recognize - * connected radio. Whan everythig is sucessfull it runs command - * processor which allows you to test radio functions. - * - */ - - - - - - -#include /* LPC21xx definitions */ -#include -#include -#include "MC1319x.h" -#include "spi.h" -#include "uart_minibee.h" - - - -struct Message MsgSnd; ///< Send buffer -struct Message MsgRcv; ///< Recieve buffer - - - - -/** - * Send data via radio - * @param *msg pointer to Message sructure - */ -void sendData(struct Message *msg) -{ - msg->done = 0; - msg->error = 0; - MC_SendPaket(msg); -} - -/** - * Reads data from Radio buffer - */ -void recieveData(void) -{ - MsgRcv.done = 0; - MsgRcv.error = 0; - - MC_RecievePaket(&MsgRcv); -} -/** - * At first it inicializes serial and SPI line + other pins + ISR (RXTXEN, IRQ....) - * then it inicialzes Radio and reads radio ID. Whan everything is sucessfull - * runs the serial command processor. - * - */ - -int main (void) { - - volatile uint32_t test =0; - - // init serial line - init_uart(); - - // init SPI line, ISR and oter pins - send_rs_str("SPI init.\n"); - spi_Init(5); - - // reset and inicialize radio - send_rs_str("\nMC reset\n"); - if (MC_Reset()==1) - { - send_rs_str("FAIL\n"); - while(1); - } - - // Read and test radio ID - send_rs_str("Who am i:\n"); - test = MC_WhoAmI(); - if((test == 0x5000) | (test == 0x5400)) - { - send_rs_str("MC13192 Detected\n"); - } - else if ((test == 0x6000) | (test == 0x6400)) - send_rs_str("MC13202 Detected\n"); - else - { - send_rs_str("ID FAIL: "); - send_rs_int(test); - while(1); - } - - - MC_SetPa(0xFF); // nastavi vysilaci vykon - MC_SetChannel(ZB_CH802_21); // nastavi kanal - - - - int command = 0; - int myvar = 0; - int j = 0; - send_rs_str("Entering command processor loop\n"); - - while(1) - { - send_rs_str("-----------------------------------\n"); - send_rs_str("1 Send message\n"); - send_rs_str("2 Recieve message\n"); - send_rs_str("3 Get IRQ pin\n"); - send_rs_str("4 enable ISR\n"); - send_rs_str("5 Read IRQ\n"); - send_rs_str("6 Set channel\n"); - send_rs_str("7 Energy detect\n"); - send_rs_str("8 Set clock output\n"); - send_rs_str("-----------------------------------\n"); - - command = uart_get_char(); - uart_send_char(command); - uart_send_char('\n'); - - switch(command){ - case '1': - send_rs_str("Sending message\n"); - MsgSnd.len = 14; - MsgSnd.data[0] = 0x88; - MsgSnd.data[1] = 0x41; - MsgSnd.data[2] = 0x22; - MsgSnd.data[3] = 0x88; - MsgSnd.data[4] = 0xFF; - MsgSnd.data[5] = 0x00; - MsgSnd.data[6] = 0x01; - MsgSnd.data[7] = 0xFF; - MsgSnd.data[8] = 0x06; - MsgSnd.data[9] = 0x00; - MsgSnd.data[10] = 0x01; - MsgSnd.data[11] = 0x00; - MsgSnd.data[12] = 0x89; - MsgSnd.data[13] = 0x00; - sendData(&MsgSnd); - break; - - case '5': - disable_IRQ_pin(); - send_rs_str("IRQ register is: "); - myvar = spi_Read(IRQ_STATUS); // acknowledge power-on IRQ - send_rs_int(myvar); - enable_IRQ_pin(); - break; - - case '3': - send_rs_str("IRQ pin is: "); - if((IO0PIN & (1<= '0')&(j<='9'))){ - send_rs_str("Bad value\n"); - break; - } - myvar += (j - '0'); - myvar -= 10; - MC_SetChannel(myvar); - break; - - case '7': - send_rs_str("Energy detect: "); - send_rs_int(MC_ED()); - break; - - case '8': - send_rs_str("Enable CLKO? (y/n) "); - j = uart_get_char(); - uart_send_char(j); - if( j == 'n') - { - send_rs_str("CLKO - Switching OFF"); - MC_SetClko(CLKO_CTL_CLKO_16Km, CLKO_CTL_CLKO_OFFm); - break; - } - else if( j != 'y') - { - send_rs_str("\nInvalid command\n"); - break; - } - - - send_rs_str("Select clock\n"); - send_rs_str("1 16.393kHz\n"); - send_rs_str("2 32.786kHz\n"); - send_rs_str("3 62.5kHz\n"); - send_rs_str("4 1Mhz\n"); - send_rs_str("5 2Mhz\n"); - send_rs_str("6 4Mhz\n"); - send_rs_str("7 8Mhz\n"); - send_rs_str("8 16Mhz\n"); - - j = uart_get_char(); - uart_send_char(j); - - if(('0' < j) & (j < '9')) - { - switch(j){ - case '1': - MC_SetClko(CLKO_CTL_CLKO_16Km, CLKO_CTL_CLKO_ONm); - break; - case '2': - MC_SetClko(CLKO_CTL_CLKO_32Km, CLKO_CTL_CLKO_ONm); - break; - case '3': - MC_SetClko(CLKO_CTL_CLKO_62Km, CLKO_CTL_CLKO_ONm); - break; - case '4': - MC_SetClko(CLKO_CTL_CLKO_1Mm, CLKO_CTL_CLKO_ONm); - break; - case '5': - MC_SetClko(CLKO_CTL_CLKO_2Mm, CLKO_CTL_CLKO_ONm); - break; - case '6': - MC_SetClko(CLKO_CTL_CLKO_4Mm, CLKO_CTL_CLKO_ONm); - break; - case '7': - MC_SetClko(CLKO_CTL_CLKO_8Mm, CLKO_CTL_CLKO_ONm); - break; - case '8': - MC_SetClko(CLKO_CTL_CLKO_16Mm, CLKO_CTL_CLKO_ONm); - break; - default: - break; - } - } - else - { - - send_rs_str("Invalid command\n"); - } - break; - - - default: - send_rs_str("Bad command!\n"); - break; - - } - - dummy_wait(); - - // test if sessage is sent - if ((MsgSnd.done == 1)) - { - send_rs_str("Message sent!!!!!!!!!!!!!!\n"); - MsgSnd.done = 0; - // add same handle code her - } - - // test if some packet is recieved - if ((MsgRcv.done == 1)) - { - // add same handle code here - } - - - - send_rs_str("\nHit key to continue ..."); - uart_get_char(); - send_rs_str("\n\n\n\n\n\n\n\n\n\n"); - } - -} - - - diff --git a/board/arm/lpceurobot/app/minibee/minibee.kdevelop b/board/arm/lpceurobot/app/minibee/minibee.kdevelop deleted file mode 100644 index 082b4c3..0000000 --- a/board/arm/lpceurobot/app/minibee/minibee.kdevelop +++ /dev/null @@ -1,233 +0,0 @@ - - - - Bc. Jiri Kubias - Jiri.kubias@gmail.com - 1 - KDevCustomProject - C - - minibee - . - false - - - - - - - executable - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee - - make load-flash - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee - false - false - false - false - false - - - - *.java - *.h - *.H - *.hh - *.hxx - *.hpp - *.c - *.C - *.cc - *.cpp - *.c++ - *.cxx - Makefile - CMakeLists.txt - - - spi.c - spi.h - zigbee.c - doc - doc/latex - doc/latex/Makefile - - - make - - - - 0 - - - - default - - - - - - false - 0 - 0 - false - /usr/bin/make - - - default - - - - - - - - - - - - - true - false - false - false - - - false - true - 10 - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - kde2book - libstdc++ - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - qt-kdev3 - ruby - ruby_bugs - sdl - stl - sw - w3c-dom-level2-html - w3c-svg - w3c-uaag10 - wxwidgets_bugs - - - Guide to the Qt Translation Tools - Qt Assistant Manual - Qt Designer Manual - Qt Reference Documentation - qmake User Guide - - - KDE Libraries (Doxygen) - - - - - - - - - - - - false - 3 - 3 - /usr/qt/3 - EmbeddedKDevDesigner - /usr/qt/3/bin/qmake - /usr/qt/3/bin/designer - - - - false - true - true - 250 - 400 - 250 - false - 0 - true - true - false - std=_GLIBCXX_STD;__gnu_cxx=std - true - false - false - false - false - true - true - false - .; - - - - set - m_,_ - theValue - true - true - - - false - true - Vertical - - - - - - .h - .cpp - - - - - - - - - - - - false - false - - - *.o,*.lo,CVS - false - - - - - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/tags - - - diff --git a/board/arm/lpceurobot/app/minibee/minibee.kdevelop.filelist b/board/arm/lpceurobot/app/minibee/minibee.kdevelop.filelist deleted file mode 100644 index 9c1a68c..0000000 --- a/board/arm/lpceurobot/app/minibee/minibee.kdevelop.filelist +++ /dev/null @@ -1,10 +0,0 @@ -# KDevelop Custom Project File List -MC1319x.c -MC1319x.h -MC1319xdef.h -Makefile -main.c -spi_LPC.c -spi_avr.c -uart_minibee.c -uart_minibee.h diff --git a/board/arm/lpceurobot/app/minibee/minibee.kdevelop.pcs b/board/arm/lpceurobot/app/minibee/minibee.kdevelop.pcs deleted file mode 100644 index 5c4f166..0000000 Binary files a/board/arm/lpceurobot/app/minibee/minibee.kdevelop.pcs and /dev/null differ diff --git a/board/arm/lpceurobot/app/minibee/minibee.kdevses b/board/arm/lpceurobot/app/minibee/minibee.kdevses deleted file mode 100644 index f18b3ea..0000000 --- a/board/arm/lpceurobot/app/minibee/minibee.kdevses +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/board/arm/lpceurobot/app/minibee/minibee.tag b/board/arm/lpceurobot/app/minibee/minibee.tag deleted file mode 100644 index 33be7af..0000000 --- a/board/arm/lpceurobot/app/minibee/minibee.tag +++ /dev/null @@ -1,1849 +0,0 @@ - - - - index - Zigbee radio MC13192 or MC13202 - index - Introduction - - - main.c - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - main_8c - MC1319x.h - spi.h - uart_minibee.h - - void - sendData - main_8c.html - ee6000bc24613b40e31fa4879578fb31 - (struct Message *msg) - - - void - recieveData - main_8c.html - abecc12f56c4bb08f5b9beb4e655742b - (void) - - - int - main - main_8c.html - 840291bc02cba5474a4cb46a9b9566fe - (void) - - - struct Message - MsgSnd - main_8c.html - 0ede4cc1258337c4c600518d2cc34a5e - - - - struct Message - MsgRcv - main_8c.html - 5ead1224beac6631f8f3ca0f57fffc2c - - - - - MC1319x.c - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - MC1319x_8c - spi.h - MC1319x.h - MC1319xdef.h - - uint8_t - MC_RecievePaket - MC1319x_8c.html - 3fe506ae7cef806e892a0f736bf742e5 - (struct Message *msg) - - - void - ext_isr - MC1319x_8c.html - e42a33dfd728c53890e5ecb159f57c7f - (void) - - - void - dummy_wait - MC1319x_8c.html - 0ed86ef3cd64826822473dbbebe0d7a4 - () - - - void - MC_Woodoo - MC1319x_8c.html - b088fe90babf0fdf82ee824d04858094 - (void) - - - uint8_t - MC_Reset - MC1319x_8c.html - 099634cdb7405d32200e6556fca27b6c - (void) - - - uint8_t - MC_ED - MC1319x_8c.html - 98f73499d8a965377ebb976c8a682d0c - (void) - - - uint8_t - MC_SendPaket - MC1319x_8c.html - f4f8db7c7df1b7982e6b9a3bd217be0b - (struct Message *msg) - - - uint8_t - MC_ReSendPaket - MC1319x_8c.html - 9263dab03a7f0a473ef7fada3e54c837 - (struct Message *msg) - - - uint16_t - MC_WhoAmI - MC1319x_8c.html - 1a3a6d44b176d3b528f464ca74a4f7b3 - (void) - - - uint8_t - MC_SetChannel - MC1319x_8c.html - bfbc2cbe1edf2878ccb09cc58edffd22 - (uint8_t channel) - - - uint8_t - MC_SetClko - MC1319x_8c.html - 339d44adf7ab46d02a17a11208a25800 - (uint16_t tick, uint8_t enable) - - - uint8_t - MC_SetPa - MC1319x_8c.html - 02257409afdb9f37b481989507fb5024 - (uint8_t val) - - - struct Message * - rcvBuf - MC1319x_8c.html - eb0be220f20aa0923d8122c5c42c5971 - - - - struct Message * - sndBuf - MC1319x_8c.html - 0382b4fc5cd190a5c5e83670d1e4f2bb - - - - - MC1319x.h - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - MC1319x_8h - MC1319xdef.h - - uint8_t - MC_Reset - MC1319x_8h.html - 099634cdb7405d32200e6556fca27b6c - (void) - - - uint16_t - MC_WhoAmI - MC1319x_8h.html - 1a3a6d44b176d3b528f464ca74a4f7b3 - (void) - - - uint8_t - MC_ED - MC1319x_8h.html - 98f73499d8a965377ebb976c8a682d0c - (void) - - - uint8_t - MC_SendPaket - MC1319x_8h.html - f4f8db7c7df1b7982e6b9a3bd217be0b - (struct Message *msg) - - - uint8_t - MC_ReSend - MC1319x_8h.html - cc2bfa1d89a61fc6370a82404947bec3 - (struct Message *msg) - - - uint8_t - MC_RecievePaket - MC1319x_8h.html - 3fe506ae7cef806e892a0f736bf742e5 - (struct Message *msg) - - - uint8_t - MC_SetClko - MC1319x_8h.html - 339d44adf7ab46d02a17a11208a25800 - (uint16_t tick, uint8_t enable) - - - uint8_t - MC_SetPa - MC1319x_8h.html - 02257409afdb9f37b481989507fb5024 - (uint8_t val) - - - void - dummy_wait - MC1319x_8h.html - 0ed86ef3cd64826822473dbbebe0d7a4 - () - - - void - ext_isr - MC1319x_8h.html - 2d5b82f5c627f8123fc48a6ab2795743 - (void) __attribute__((interrupt)) - - - - MC1319xdef.h - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - MC1319xdef_8h - Message - - #define - LPC - MC1319xdef_8h.html - 3dee031a5e8ffec497faf7e5e5d42565 - - - - #define - IRQ - MC1319xdef_8h.html - 46fc8a17c0936cda0556a966cc2f62fb - - - - #define - CE - MC1319xdef_8h.html - f332f65aca07c44deeda884c8f6c353c - - - - #define - ATTN - MC1319xdef_8h.html - 67481fc0148df36eb20f078ff1ce2d7c - - - - #define - RXTXEN - MC1319xdef_8h.html - 75eaa04e13035b83f95c3598bf0fef44 - - - - #define - RST - MC1319xdef_8h.html - c5d957e4fd3dc11cd97a54cf9ca057a4 - - - - #define - MOSI - MC1319xdef_8h.html - 5d3f11f2fdf8a7e27b975291e0c2c8cc - - - - #define - MISO - MC1319xdef_8h.html - 7334c540878c8c4d801fd75ed9fd8063 - - - - #define - SCK - MC1319xdef_8h.html - 2dd443a4430713d325ab86895a4a45eb - - - - #define - CLR - MC1319xdef_8h.html - 74bc9444cf3ef3289a07cea717e16764 - (x) - - - #define - SET - MC1319xdef_8h.html - 1e573d4c5b004a71c86c15800b65708f - (x) - - - #define - RD - MC1319xdef_8h.html - efaf886fe6a8977a1a887fb491a6e82c - - - - #define - WR - MC1319xdef_8h.html - c1efd35edf6555320eb2a4b0b2d9c3a7 - - - - #define - RESET - MC1319xdef_8h.html - b702106cf3b3e96750b6845ded4e0299 - - - - #define - RX_PKT_RAM - MC1319xdef_8h.html - 5dbcafbeb02080d09e78e52bcadb1fb0 - - - - #define - TX_PKT_RAM - MC1319xdef_8h.html - ef9d1f4f568dc8d568c508ace69cb0c4 - - - - #define - TX_PKT_CTL - MC1319xdef_8h.html - ca3f7b52cd37cf4e19aaccb3705492ed - - - - #define - TX_PKT_CTL_RAM2_SELm - MC1319xdef_8h.html - 5e21c8cf94564a8e982aafd43f2b51a0 - - - - #define - TX_PKT_CTL_PKT_LENGHT - MC1319xdef_8h.html - 4e6e1ca84ae3a3c72effbf7ba360fe72 - (x) - - - #define - CCA_THRESH - MC1319xdef_8h.html - 880d164cbc98171e082c9554ff99dd02 - - - - #define - IRQ_MASK - MC1319xdef_8h.html - 300b7e28a313b19099713ea04f09fdaa - - - - #define - IRQ_MASK_ATTNm - MC1319xdef_8h.html - 2058a9037b76ad2aa0e58b56e21a5d3a - - - - #define - IRQ_MASK_RAM_ADDRm - MC1319xdef_8h.html - fdb37cb7a5705480c01ed27837a4de2c - - - - #define - IRQ_MASK_ARB_BUSYm - MC1319xdef_8h.html - cd2c8c3ab879d459f020937d48ef8f0c - - - - #define - IRQ_MASK_STRM_DATAm - MC1319xdef_8h.html - 04136886c78ee543a535469a04dc0024 - - - - #define - IRQ_MASK_PPL_LOCKm - MC1319xdef_8h.html - b4cbcabfa5fc3a1cc629f850837e761e - - - - #define - IRQ_MASK_ACOMAm - MC1319xdef_8h.html - 6bcf0982d5b7ed6a894ea67b57d67696 - - - - #define - IRQ_MASK_DOZEm - MC1319xdef_8h.html - f3080a2c1781eab4959dfc4ba207966c - - - - #define - IRQ_MASK_TMR4m - MC1319xdef_8h.html - f6c0584bbcfed769be34f75ff7298fca - - - - #define - IRQ_MASK_TMR3m - MC1319xdef_8h.html - 7affba036c584bcc7443dbb3d395bbbe - - - - #define - IRQ_MASK_TMR2m - MC1319xdef_8h.html - 3ccfe72ab064a6c1989c32d1e6e913cb - - - - #define - IRQ_MASK_TMR1m - MC1319xdef_8h.html - 5f6abe73e9473ae483fae1e33cef9130 - - - - #define - CONTROL_A - MC1319xdef_8h.html - 32782596b83917d3ac2000ee2114807f - - - - #define - CONTROL_A_TX_STRMm - MC1319xdef_8h.html - 2b47fec88c7ae45d3e143c1204f8e205 - - - - #define - CONTROL_A_RX_STRMm - MC1319xdef_8h.html - 31405fd6c34f97776ce08e04b290e039 - - - - #define - CONTROL_A_CCAm - MC1319xdef_8h.html - e31a0f9699124efbeba1b03605861222 - - - - #define - CONTROL_A_TX_SENTm - MC1319xdef_8h.html - 135b40fc49c8928232368b0e2ab945cf - - - - #define - CONTROL_A_RX_RCVDm - MC1319xdef_8h.html - a72b9d79fdf692d4745c46de3a8ac9e7 - - - - #define - CONTROL_A_TMR_TRIG_ENm - MC1319xdef_8h.html - 19db7d302b1adaca235f4b23643761a8 - - - - #define - CONTROL_A_CCA_TYPE1m - MC1319xdef_8h.html - 6a9ceab99f026a86acf0118f000a0ea5 - - - - #define - CONTROL_A_CCA_TYPE0m - MC1319xdef_8h.html - 43a0428a419cb65541b776157ce03181 - - - - #define - CONTROL_A_CCA_CCAm - MC1319xdef_8h.html - ad34e01523309e53b1bd2a39587b69bd - - - - #define - CONTROL_A_CCA_EDm - MC1319xdef_8h.html - def18f0318ff5e45578492b68c031bd1 - - - - #define - CONTROL_A_CCA_XCVR_SEG1m - MC1319xdef_8h.html - f07851303ac030fa45293517e87bfd51 - - - - #define - CONTROL_A_CCA_XCVR_SEG0m - MC1319xdef_8h.html - 214e92f0776df62a191edfc135da40fd - - - - #define - CONTROL_A_CCA_XCVR_IDLEm - MC1319xdef_8h.html - 1575fe96d0855965ede245beeb37def3 - - - - #define - CONTROL_A_CCA_XCVR_CCAEDm - MC1319xdef_8h.html - 68c3ef1f27068d2137f4497f85d88a44 - - - - #define - CONTROL_A_CCA_XCVR_PMRXm - MC1319xdef_8h.html - 4cbc11d3d1be22405f6b4b1758f6b52d - - - - #define - CONTROL_A_CCA_XCVR_PMTXm - MC1319xdef_8h.html - a9c7f23a2e1016d403b16eea7634ef69 - - - - #define - CONTROL_A_CCA_XCVR_CLRm - MC1319xdef_8h.html - 0994c15a3bcf145696c112fa2446baa3 - - - - #define - CONTROL_B - MC1319xdef_8h.html - e1d91669b06dc7d7ea30e41d9048c24a - - - - #define - CONTROL_B_TMR_LOADm - MC1319xdef_8h.html - 52638c2633f541320f2287e7a3d41bcf - - - - #define - CONTROL_B_MISO_HIZ_ENm - MC1319xdef_8h.html - 6e3dc0539fb74080b152173dbf5249d4 - - - - #define - CONTROL_B_CLKO_DOZE_ENm - MC1319xdef_8h.html - 47efa6299949f8282564b6ddff8361de - - - - #define - CONTROL_B_TX_DONEm - MC1319xdef_8h.html - 2e92d84c42aa565f1c8a3a2aeb96b05e - - - - #define - CONTROL_B_RX_DONEm - MC1319xdef_8h.html - 7d578ade881dd6f42da81129c483768d - - - - #define - CONTROL_B_USE_STM_MODEm - MC1319xdef_8h.html - 4e862c709c5744ff81cafe421cd39230 - - - - #define - CONTROL_B_HIB_ENm - MC1319xdef_8h.html - 41b1e45b4f7834017facd0c0c271c3e1 - - - - #define - CONTROL_B_DOZE_ENm - MC1319xdef_8h.html - 3abcad46bcaadf1f96857f10e8153c17 - - - - #define - PA_ENABLE - MC1319xdef_8h.html - 03d8a3cfd38ec5b486574866d25e7160 - - - - #define - PA_ENABLE_PA_ENm - MC1319xdef_8h.html - 11221505bac308b205cb5f44329089f0 - - - - #define - CONTROL_C - MC1319xdef_8h.html - 13c2a9e1f2b382c5a68735dfd1c67ff9 - - - - #define - CONTROL_C_GPIO_ALT_ENm - MC1319xdef_8h.html - 4fb17fccc237e0aa44bc163885f41607 - - - - #define - CONTROL_C_CLKO_ENm - MC1319xdef_8h.html - 3ceb2e0ba9fa782849bf58ef7a42dbd8 - - - - #define - CONTROL_C_TMR_PRESCALE2m - MC1319xdef_8h.html - 501c7e4655ba80c362f870355239a89d - - - - #define - CONTROL_C_TMR_PRESCALE1m - MC1319xdef_8h.html - 0d1c78de1fe7d1f8c1bb3fe95ae4fc1a - - - - #define - CONTROL_C_TMR_PRESCALE0m - MC1319xdef_8h.html - dd87271c69ce838f76b39bcc28302637 - - - - #define - CLKO_CTL - MC1319xdef_8h.html - 48b3d5ea128025ef2bb93b69472e2e76 - - - - #define - CLKO_CTL_CLKO_RATE2m - MC1319xdef_8h.html - b6a90e47e9204a2cdb9a8c0792a342dd - - - - #define - CLKO_CTL_CLKO_RATE1m - MC1319xdef_8h.html - 0b119f41dc0193c0f581f7b41a14faf4 - - - - #define - CLKO_CTL_CLKO_RATE0m - MC1319xdef_8h.html - b6727557837aeb16c4411bef5a05b286 - - - - #define - CLKO_CTL_CLKO_16Mm - MC1319xdef_8h.html - 21d5b7a3aa938c82af3ba51709bc939d - - - - #define - CLKO_CTL_CLKO_8Mm - MC1319xdef_8h.html - a064e808fcaf27bb504d651963a1387c - - - - #define - CLKO_CTL_CLKO_4Mm - MC1319xdef_8h.html - 794670cd1c019221c6407cfd8818d5a0 - - - - #define - CLKO_CTL_CLKO_2Mm - MC1319xdef_8h.html - af17045ee51561e7d132cf6d545dd579 - - - - #define - CLKO_CTL_CLKO_1Mm - MC1319xdef_8h.html - 479f24a20e83b23f6dc02f5356997d32 - - - - #define - CLKO_CTL_CLKO_62Km - MC1319xdef_8h.html - 9c97032a5f2c63dc7a004832e00a2702 - - - - #define - CLKO_CTL_CLKO_32Km - MC1319xdef_8h.html - 5685e76f4f1b7594670f20d9e0a3f10b - - - - #define - CLKO_CTL_CLKO_16Km - MC1319xdef_8h.html - d258c47d3822ab8e2280fefe8e8d670a - - - - #define - CLKO_CTL_CLKO_ONm - MC1319xdef_8h.html - ae16c3c3c02814f174b355f2370e8345 - - - - #define - CLKO_CTL_CLKO_OFFm - MC1319xdef_8h.html - 60d6f5ef48ff9a7c1e25dad819f443d5 - - - - #define - CLKO_CTL_CLKO_CLRm - MC1319xdef_8h.html - 81af51f369345a34d4d2c1fbf938b60c - - - - #define - GPIO_DIR - MC1319xdef_8h.html - 637a20b456c93e8248c861fa48510841 - - - - #define - GPIO_DATA_OUT - MC1319xdef_8h.html - c7f8340f1080d59df32708a2455100d1 - - - - #define - LO1_INT_DIV - MC1319xdef_8h.html - ca2fcb248af07823b5886b348147ef77 - - - - #define - LO1_INT_DIV_CH1 - MC1319xdef_8h.html - 3d8cc422bd40604871cea8560533c349 - - - - #define - LO1_INT_DIV_CH2 - MC1319xdef_8h.html - 5828d649515d40f2efa45adf909b40f2 - - - - #define - LO1_INT_DIV_CH3 - MC1319xdef_8h.html - 2b9841efc56c22fef5b7761c07608c02 - - - - #define - LO1_INT_DIV_CH4 - MC1319xdef_8h.html - 1873bb919beb0f3b00adc47a88f7b42a - - - - #define - LO1_INT_DIV_CH5 - MC1319xdef_8h.html - b6d2b844931e00597abf0791d1275935 - - - - #define - LO1_INT_DIV_CH6 - MC1319xdef_8h.html - 1e1aa4ddfe8c9e2f3f9f5895cdd751c5 - - - - #define - LO1_INT_DIV_CH7 - MC1319xdef_8h.html - 10c4723cb836a3fe91038f4bf8a778ec - - - - #define - LO1_INT_DIV_CH8 - MC1319xdef_8h.html - 3dc6818a0c97ca323a66da1fa17aecef - - - - #define - LO1_INT_DIV_CH9 - MC1319xdef_8h.html - a8bf98d75a543e72b4e18b71b3c116bc - - - - #define - LO1_INT_DIV_CH10 - MC1319xdef_8h.html - 30f1a46a6bfd01ff7fdb761f08ccc00b - - - - #define - LO1_INT_DIV_CH11 - MC1319xdef_8h.html - 6d53ae069f2db801a8aa5ca588154d5d - - - - #define - LO1_INT_DIV_CH12 - MC1319xdef_8h.html - be4a9b341b8ef487c2b52e6d453c8b2f - - - - #define - LO1_INT_DIV_CH13 - MC1319xdef_8h.html - bd14afc4fda0fe79399f872485d06e93 - - - - #define - LO1_INT_DIV_CH14 - MC1319xdef_8h.html - 8d0551fd82943350b1823e73d9b75f10 - - - - #define - LO1_INT_DIV_CH15 - MC1319xdef_8h.html - 26942e0ee9e2a2bb7cb0d65706272419 - - - - #define - LO1_INT_DIV_CH16 - MC1319xdef_8h.html - e626dced715d6d66b912f8d3ea2ae1e0 - - - - #define - LO1_NUM - MC1319xdef_8h.html - ee243f6fb1b3ce251b930cb54b23f79a - - - - #define - LO1_NUM_CH1 - MC1319xdef_8h.html - f5068b92d6689a67ed049a0cba5169f6 - - - - #define - LO1_NUM_CH2 - MC1319xdef_8h.html - 50d85c92c1990a95c5aefcee73934ce6 - - - - #define - LO1_NUM_CH3 - MC1319xdef_8h.html - e421d0e3ff2c2e4509fe3d9b5b88af92 - - - - #define - LO1_NUM_CH4 - MC1319xdef_8h.html - 02c947074cd499e03ee4c220f90d1eab - - - - #define - LO1_NUM_CH5 - MC1319xdef_8h.html - 6dd8f5ac6bcfbb4497d497445dcc0463 - - - - #define - LO1_NUM_CH6 - MC1319xdef_8h.html - 5e39d950d283afb15348988954157381 - - - - #define - LO1_NUM_CH7 - MC1319xdef_8h.html - ebb64bc2122bdcbb14ced1f0a4582490 - - - - #define - LO1_NUM_CH8 - MC1319xdef_8h.html - 74c61e029b4de5ea1c2b5e1a153f7b76 - - - - #define - LO1_NUM_CH9 - MC1319xdef_8h.html - 019b4cdba93a4389755cda6734e65d50 - - - - #define - LO1_NUM_CH10 - MC1319xdef_8h.html - b3c3c89927d46541d426782763d2e735 - - - - #define - LO1_NUM_CH11 - MC1319xdef_8h.html - 1f0a5c59a135d9727596cdfd05a846bf - - - - #define - LO1_NUM_CH12 - MC1319xdef_8h.html - 72aee0649597e7a5fa3ca7eacda5ce99 - - - - #define - LO1_NUM_CH13 - MC1319xdef_8h.html - 9aa250768ccb29f252984121068d58df - - - - #define - LO1_NUM_CH14 - MC1319xdef_8h.html - 7cb73d3ef359fea2c4890107c8bbc2e7 - - - - #define - LO1_NUM_CH15 - MC1319xdef_8h.html - 15e2d2c3f13c0d95bff881a29c3ebea1 - - - - #define - LO1_NUM_CH16 - MC1319xdef_8h.html - 384176be7d57b8074ca2f82b6c5b42af - - - - #define - ZB_CH1 - MC1319xdef_8h.html - f0006c05c4805a128d72844be86117e0 - - - - #define - ZB_CH2 - MC1319xdef_8h.html - 7bfda5ea1d061ec6f3bf37bc660bc617 - - - - #define - ZB_CH3 - MC1319xdef_8h.html - 1af5e53fb85e1e625e59fb8a09a489ae - - - - #define - ZB_CH4 - MC1319xdef_8h.html - f26e5f28479ab253427f9b7d38b770b4 - - - - #define - ZB_CH5 - MC1319xdef_8h.html - 2999354d1bb49b8821db71d70e940138 - - - - #define - ZB_CH6 - MC1319xdef_8h.html - 6de37bb572cb3af47d63bc56dafdc0ea - - - - #define - ZB_CH7 - MC1319xdef_8h.html - 2c6e23deb902bffa8c8691933dbdc60e - - - - #define - ZB_CH8 - MC1319xdef_8h.html - e2ac642a24cbf28a52d1c6169a9f9659 - - - - #define - ZB_CH9 - MC1319xdef_8h.html - 50fb7c4a3d6ea560bc713d5e6c87f195 - - - - #define - ZB_CH10 - MC1319xdef_8h.html - fb83f0555eeaf966f6d3f150e40e7c3f - - - - #define - ZB_CH11 - MC1319xdef_8h.html - 4ad013cb3d33a46238f5039a5c9b279c - - - - #define - ZB_CH12 - MC1319xdef_8h.html - 23fe1fc2d00a43d5575814d431a65606 - - - - #define - ZB_CH13 - MC1319xdef_8h.html - 48f3d8c16f245f9679badc36726b4398 - - - - #define - ZB_CH14 - MC1319xdef_8h.html - b74d49877e12fdfa277f673cdfafc3c9 - - - - #define - ZB_CH15 - MC1319xdef_8h.html - 4f9cd9fe7fca8245504d7f4c09037012 - - - - #define - ZB_CH16 - MC1319xdef_8h.html - 7c20da487a0e4b366e20682602422d0b - - - - #define - ZB_CH802_11 - MC1319xdef_8h.html - add0e37c1b38c9e0955ef41d80b4a996 - - - - #define - ZB_CH802_12 - MC1319xdef_8h.html - f3b93763bd0614b8386ce6f9564f45a3 - - - - #define - ZB_CH802_13 - MC1319xdef_8h.html - c3dd7741bff2172736a7e254edb691de - - - - #define - ZB_CH802_14 - MC1319xdef_8h.html - 772d39dab2bb87d7cd6d01bd9663b462 - - - - #define - ZB_CH802_15 - MC1319xdef_8h.html - 6d8d19096d0efb253ec8f962303d94e1 - - - - #define - ZB_CH802_16 - MC1319xdef_8h.html - 5bcb9b9838b8987b7ae303b08ca99a21 - - - - #define - ZB_CH802_17 - MC1319xdef_8h.html - a42d94a638095e514bf313e8b2b61689 - - - - #define - ZB_CH802_18 - MC1319xdef_8h.html - febe80e9aef311e427955b35711d159e - - - - #define - ZB_CH802_19 - MC1319xdef_8h.html - c984c397b20815cca07b749185d5159f - - - - #define - ZB_CH802_20 - MC1319xdef_8h.html - 8574fc3e1bbb87f8b5b8e9131cc34c10 - - - - #define - ZB_CH802_21 - MC1319xdef_8h.html - a49bc4ffb27ccbb9b0d1a679478bea42 - - - - #define - ZB_CH802_22 - MC1319xdef_8h.html - 9fdf04c0081acb570253d3b985486740 - - - - #define - ZB_CH802_23 - MC1319xdef_8h.html - b25eb6c47e4e0b25b3eb74edb0a29a09 - - - - #define - ZB_CH802_24 - MC1319xdef_8h.html - ebd9e404761772dbf5cbb2104af05ffb - - - - #define - ZB_CH802_25 - MC1319xdef_8h.html - 07cbd4348da4bb44921b3104dc113d16 - - - - #define - ZB_CH802_26 - MC1319xdef_8h.html - 878672cb6bbb2bba1107c15a6bb67148 - - - - #define - PA_LVL - MC1319xdef_8h.html - b837bb078e0fd8faa4ee20cd6d2c3834 - - - - #define - TMR_CMP1_A - MC1319xdef_8h.html - 17e25931d2b07605940ea4d52e8db955 - - - - #define - TMR_CMP1_B - MC1319xdef_8h.html - b6341691cfe50e5635ecf6d10ef56c6f - - - - #define - TMR_CMP2_A - MC1319xdef_8h.html - e33c3e9cf354e579a97b396653b223ee - - - - #define - TMR_CMP2_B - MC1319xdef_8h.html - a657c55c046dd6d05bd252de05531019 - - - - #define - TMR_CMP3_A - MC1319xdef_8h.html - f6965c3a07ed9d9bc6b3e538ae8d3eb1 - - - - #define - TMR_CMP3_B - MC1319xdef_8h.html - 574a0202652adc3814bab565246abc94 - - - - #define - TMR_CMP4_A - MC1319xdef_8h.html - fd71dd54d591f2d3e3daafc17b5d1a34 - - - - #define - TMR_CMP4_B - MC1319xdef_8h.html - 6b421528226949439ebd37b8192e68a4 - - - - #define - TC2_PRIME - MC1319xdef_8h.html - 8e2f16b12eb58396b7c7935a74fd74cd - - - - #define - IRQ_STATUS - MC1319xdef_8h.html - 8cc14b27cb7ca6346eb2cb77f60a7162 - - - - #define - IRQ_STATUS_PLL_LOCK_IRQm - MC1319xdef_8h.html - 63045dd1094419c36eef6b9756207869 - - - - #define - IRQ_STATUS_RAM_ADR_ERRm - MC1319xdef_8h.html - 10816fac2f92317f815c40009cc03865 - - - - #define - IRQ_STATUS_ARB_BUSY_ERRm - MC1319xdef_8h.html - a5b1710f897be1686888449ada16de3b - - - - #define - IRQ_STATUS_SRTM_DATA_ERRm - MC1319xdef_8h.html - 9b34fa209fa94e518af14c75ff4bf332 - - - - #define - IRQ_STATUS_ATTN_IRQm - MC1319xdef_8h.html - 23a37ad91f39fd42da5dac455f33b425 - - - - #define - IRQ_STATUS_DOZE_IRQm - MC1319xdef_8h.html - 32115d02f58d9b2b80e47dea985ec2da - - - - #define - IRQ_STATUS_TMR1_IRQm - MC1319xdef_8h.html - 7e554504f3365987340bfde581e318a4 - - - - #define - IRQ_STATUS_RX_RCVD_IRQm - MC1319xdef_8h.html - 53b72aad750dafa7c91272a75b8eb1ca - - - - #define - IRQ_STATUS_TX_SENT_IRQm - MC1319xdef_8h.html - d08e0d0ffe644e8e1e9711a59ce57c98 - - - - #define - IRQ_STATUS_CCA_IRQm - MC1319xdef_8h.html - 2ccc3e0f3c733a465a897b02cf9a3979 - - - - #define - IRQ_STATUS_TMR3_IRQm - MC1319xdef_8h.html - 60da12a1f658c65956e0d053f976ca7d - - - - #define - IRQ_STATUS_TMR4_IRQm - MC1319xdef_8h.html - 01ca426dc8f08a51319499cab08265e6 - - - - #define - IRQ_STATUS_TMR2_IRQm - MC1319xdef_8h.html - 989b3258d9b8de2e632cb2aa65ed81c3 - - - - #define - IRQ_STATUS_CCAm - MC1319xdef_8h.html - e49891dee228c6228fd3781b4b721109 - - - - #define - IRQ_STATUS_CRC_VALIDm - MC1319xdef_8h.html - 820c37f43676f86c52b55e69fb5447b4 - - - - #define - RST_IND - MC1319xdef_8h.html - 4a2e072154eaa212f2350194ae32599b - - - - #define - RST_IND_RESET_INDm - MC1319xdef_8h.html - 8d2089e7cd64d0f70c3a4e3b36c20709 - - - - #define - CURRENT_TIME_A - MC1319xdef_8h.html - 94975bae26111e45a2af6937c4d04a91 - - - - #define - CURRENT_TIME_B - MC1319xdef_8h.html - 418cebf4c10e28e7f72b339ae3dff26f - - - - #define - GPIO_DATA_IN - MC1319xdef_8h.html - f6602aa14449f25f424cf3cb17878b15 - - - - #define - CHIP_ID - MC1319xdef_8h.html - b0aa3e54cd2934b67b9882957456c391 - - - - #define - RX_STATUS - MC1319xdef_8h.html - 731d30ee0b5f9f0471fa8e742ef1784c - - - - #define - TIMESTAMP_A - MC1319xdef_8h.html - 6e4773e12809f5b733361dbccda1289a - - - - #define - TIMESTAMP_B - MC1319xdef_8h.html - 33dd86aa81fb87c913253e5f3db9dad3 - - - - #define - BER_ENABLE - MC1319xdef_8h.html - 02d472151e2c7429cf0d3bcbb2d2807d - - - - #define - BER_ENABLE_BER_EN - MC1319xdef_8h.html - 69f2a6088bf5db62f8f994e598255e30 - - - - - spi.h - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - spi_8h - MC1319xdef.h - - #define - SPI_SPEED - spi_8h.html - 0056b7fdd0f81fad9cd38e9fd389a4b6 - - - - void - spi_Init - spi_8h.html - cb06ef92bde513fe8c00bb87ece1e408 - (int rx_isr_vect) - - - uint16_t - spi_Read - spi_8h.html - 02fffb26d66333b3c6428ff7a3bbc3fd - (uint8_t reg) - - - void - spi_Write - spi_8h.html - 9431e598f3537a5369afb01627ad24a3 - (uint8_t reg, uint16_t val) - - - void - spi_ReadModifiWrite - spi_8h.html - 45835fb3ddc2778b07b2d63b72ccef11 - (uint8_t reg, uint16_t ormask, uint16_t andmask) - - - void - spi_Write_Buf - spi_8h.html - a3d5ab927bca2d3c5deb2d49d3bd0be6 - (struct Message *msg) - - - void - spi_Read_Buf - spi_8h.html - fa22a171b888b8cd8676d160d69d1d7e - (struct Message *msg) - - - uint8_t - MC_SetChannel - spi_8h.html - bfbc2cbe1edf2878ccb09cc58edffd22 - (uint8_t channel) - - - void - disable_IRQ_pin - spi_8h.html - 6ad5b67346e28c06a14b412451c9c042 - (void) - - - void - enable_IRQ_pin - spi_8h.html - df95af49d1fd2524c60090ba3499923a - (void) - - - - spi_avr.c - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - spi__avr_8c - MC1319xdef.h - - void - spi_Init - spi__avr_8c.html - 3243eee798d6c71f2e826659953b5480 - (void) - - - uint16_t - spi_Read - spi__avr_8c.html - 02fffb26d66333b3c6428ff7a3bbc3fd - (uint8_t reg) - - - void - spi_Write - spi__avr_8c.html - 9431e598f3537a5369afb01627ad24a3 - (uint8_t reg, uint16_t val) - - - void - spi_Read_Buf - spi__avr_8c.html - fa22a171b888b8cd8676d160d69d1d7e - (struct Message *msg) - - - void - spi_Write_Buf - spi__avr_8c.html - a3d5ab927bca2d3c5deb2d49d3bd0be6 - (struct Message *msg) - - - void - spi_ReadModifiWrite - spi__avr_8c.html - 45835fb3ddc2778b07b2d63b72ccef11 - (uint8_t reg, uint16_t ormask, uint16_t andmask) - - - - spi_LPC.c - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - spi__LPC_8c - MC1319x.h - spi.h - - void - disable_IRQ_pin - spi__LPC_8c.html - 6ad5b67346e28c06a14b412451c9c042 - (void) - - - void - enable_IRQ_pin - spi__LPC_8c.html - df95af49d1fd2524c60090ba3499923a - (void) - - - void - spi_Init - spi__LPC_8c.html - cb06ef92bde513fe8c00bb87ece1e408 - (int rx_isr_vect) - - - uint16_t - spi_Read - spi__LPC_8c.html - 02fffb26d66333b3c6428ff7a3bbc3fd - (uint8_t reg) - - - void - spi_Write - spi__LPC_8c.html - 9431e598f3537a5369afb01627ad24a3 - (uint8_t reg, uint16_t val) - - - void - spi_Read_Buf - spi__LPC_8c.html - fa22a171b888b8cd8676d160d69d1d7e - (struct Message *msg) - - - void - spi_Write_Buf - spi__LPC_8c.html - a3d5ab927bca2d3c5deb2d49d3bd0be6 - (struct Message *msg) - - - void - spi_ReadModifiWrite - spi__LPC_8c.html - 45835fb3ddc2778b07b2d63b72ccef11 - (uint8_t reg, uint16_t ormask, uint16_t andmask) - - - - uart_minibee.c - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - uart__minibee_8c - MC1319xdef.h - - void - uart_send_char - uart__minibee_8c.html - 7025f92d7c751a4ff7812be0f67c2de1 - (char val) - - - char - uart_get_char - uart__minibee_8c.html - 62268b25625c1c7803674cb13c5ec518 - (void) - - - void - init_uart - uart__minibee_8c.html - c7b3df0fa68526d64c732d5f916e34b1 - (void) - - - void - send_rs_str - uart__minibee_8c.html - f67eb7f2c24524147b3c3b82f534e138 - (char data[]) - - - void - send_rs_int - uart__minibee_8c.html - 94258c25fb6ea7026fa3de55ce8d32d1 - (int val) - - - - uart_minibee.h - /home/data/robot/eurobot/sysless-lpc21xx/app/minibee/ - uart__minibee_8h - - void - uart_send_char - uart__minibee_8h.html - 7025f92d7c751a4ff7812be0f67c2de1 - (char val) - - - char - uart_get_char - uart__minibee_8h.html - 62268b25625c1c7803674cb13c5ec518 - (void) - - - void - init_uart - uart__minibee_8h.html - c7b3df0fa68526d64c732d5f916e34b1 - (void) - - - void - send_rs_int - uart__minibee_8h.html - 94258c25fb6ea7026fa3de55ce8d32d1 - (int val) - - - void - send_rs_str - uart__minibee_8h.html - f67eb7f2c24524147b3c3b82f534e138 - (char data[]) - - - - Message - structMessage.html - - uint8_t - done - structMessage.html - 000a1958e29d9c3ef65e53c143be1884 - - - - uint8_t - error - structMessage.html - 58cdbd3bb182ccba3f374eeec2e87f36 - - - - uint8_t - len - structMessage.html - 0e2f37b0ed471c18c4d1a71a23981c23 - - - - uint8_t - data - structMessage.html - dc2ecd460d7b67a67e55993c13f89a22 - [25] - - - diff --git a/board/arm/lpceurobot/app/minibee/spi.h b/board/arm/lpceurobot/app/minibee/spi.h deleted file mode 100644 index 2b2c1f8..0000000 --- a/board/arm/lpceurobot/app/minibee/spi.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - - - -/** - * @file spi_LPC.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief SPI, IRQ and pin inicialization function prototypes - * A new platform must support this functions. - * - */ - - -#ifndef SPI_LPC_H -#define SPI_LPC_H - -#include "MC1319xdef.h" - -#define SPI_SPEED 200 ///< SPI frequency in Hz - -void spi_Init(int rx_isr_vect); // inits SPI and hold MC radio in reset state -uint16_t spi_Read (uint8_t reg); // reads 16 bites from given register -void spi_Write (uint8_t reg, uint16_t val); // writes 16 bites from given register -void spi_ReadModifiWrite (uint8_t reg, uint16_t ormask, uint16_t andmask); // reads_modify-writes 16 bites from given register -void spi_Write_Buf (struct Message *msg); // fill MC transimit buffer -void spi_Read_Buf (struct Message *msg); -uint8_t MC_SetChannel(uint8_t channel); -void disable_IRQ_pin(void); -void enable_IRQ_pin(void); - -#endif diff --git a/board/arm/lpceurobot/app/minibee/spi_LPC.c b/board/arm/lpceurobot/app/minibee/spi_LPC.c deleted file mode 100644 index 65be97c..0000000 --- a/board/arm/lpceurobot/app/minibee/spi_LPC.c +++ /dev/null @@ -1,260 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - -/** - * @file spi_LPC.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief SPI, IRQ and pin inicialization, platform dependent! - * Contains support functions for SPI communiacations - * - */ - -#include /* LPC21xx definitions */ -#include -#include "MC1319x.h" -#include -#include "spi.h" - - -/** - * Disabling interupt from radio IRQ pin - */ -void disable_IRQ_pin(void) -{ - VICIntEnClr |= 1<>8) & 0xFF; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - S0SPDR = val & 0xFF; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - SET(CE); -} - - - -/** - * Read recieved data to Message structure - * - * @param *msg pointer to Messge structure - */ -void spi_Read_Buf (struct Message *msg) // write message to MC radio message buffer -{ - - uint8_t i =0; - uint8_t dummy =0; - - - CLR(CE); - - S0SPDR = RX_PKT_RAM | RD; // init write - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - - - S0SPDR = 0x00; // dummy read - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - S0SPDR = 0x00; // dummy read - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - for( i = 0; i < (msg->len - 2); i++) - { - - S0SPDR = 0; // cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - dummy = S0SPDR; - - if ((i % 2) == 0) msg->data[i + 1] = dummy; - else msg->data[i - 1] = dummy; - } - - if((msg->len % 2) ==1) - { - S0SPDR = 0x00; // dummy read - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - } - - SET(CE); -} - - -/** - * Write messgage to internal radio buffer - * @param *msg pointer to Message structure - */ -void spi_Write_Buf (struct Message *msg) // write message to MC radio message buffer -{ - uint8_t i =0; - - CLR(CE); - - S0SPDR = TX_PKT_RAM | WR; // init write - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - - for( i = 0; i < msg->len; i++) - { - S0SPDR = msg->data[i]; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - } - - - if((msg->len % 2) ==1) - { - S0SPDR = 0x00; // dummy write - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - } - - SET(CE); -} - - - - -/** - * Read-modify write function for modifiing registers in radio - * @param reg register to modify - * @param ormask OR mask - * @param andmask AND mask - */ -void spi_ReadModifiWrite (uint8_t reg, uint16_t ormask, uint16_t andmask) // writes 16 bites from given register -{ - uint16_t data =0; - - reg &= 0x3F; // protection before too high value - - CLR(CE); - - S0SPDR = reg | RD;// zapis prvniho byte - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - S0SPDR = 0; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - data = (S0SPDR << 8); - - S0SPDR = 0; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - data |= S0SPDR; - - SET(CE); - - data &= andmask; - data |= ormask; - - CLR(CE); - - S0SPDR = reg | WR;// zapis prvniho byte - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - S0SPDR = (data>>8) & 0xFF; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - - S0SPDR = data & 0xFF; // zapis druhyho byte a cteni - while((S0SPSR & SPSR_SPIF_m) != SPSR_SPIF_m); - - SET(CE); -} diff --git a/board/arm/lpceurobot/app/minibee/spi_avr.c b/board/arm/lpceurobot/app/minibee/spi_avr.c deleted file mode 100644 index e9880dc..0000000 --- a/board/arm/lpceurobot/app/minibee/spi_avr.c +++ /dev/null @@ -1,209 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - -/** - * @file spi_avr.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief SPI, IRQ and pin inicialization, platform dependent! - * Contains support functions for SPI communiacations. - * This portage is not fully ported, some functions are missing. - * This part is no longer supprted. - * - */ - - - -#include "MC1319xdef.h" - - -void spi_Init(void) // inits SPI and hold MC radio in reset state -{ - // setting SPI port - PORTB |= 0xFF; // enables pullups on PORT B - DDRB = (1<>8) & 0xFF; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - - - - SPDR = val & 0xFF; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - - - SET(CE); -} - - - -void spi_Read_Buf (struct Message *msg) // write message to MC radio message buffer -{ - - uint8_t i =0; - uint8_t dummy =0; - - - CLR(CE); - - SPDR = RX_PKT_RAM | RD; // init write - while((SPSR & 0x80) != 0x80); - - - - SPDR = 0x00; // dummy read - while((SPSR & 0x80) != 0x80); - SPDR = 0x00; // dummy read - while((SPSR & 0x80) != 0x80); - - for( i = 0; i < (msg->len - 2); i++) - { - - SPDR = 0; // cteni - while((SPSR & 0x80) != 0x80); - - dummy = SPDR; - - if ((i % 2) == 0) msg->data[i + 1] = dummy; - else msg->data[i - 1] = dummy; - - - } - - - if((msg->len % 2) ==1) - { - - SPDR = 0x00; // dummy read - while((SPSR & 0x80) != 0x80); - } - - SET(CE); -} - - -void spi_Write_Buf (struct Message *msg) // write message to MC radio message buffer -{ - - uint8_t i =0; - - - CLR(CE); - - SPDR = TX_PKT_RAM | WR; // init write - while((SPSR & 0x80) != 0x80); - - - for( i = 0; i < msg->len; i++) - { - - SPDR = msg->data[i]; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - } - - - if((msg->len % 2) ==1) - { - - SPDR = 0x00; // dummy write - while((SPSR & 0x80) != 0x80); - } - - SET(CE); -} - -void spi_ReadModifiWrite (uint8_t reg, uint16_t ormask, uint16_t andmask) // writes 16 bites from given register -{ - - uint16_t data =0; - - reg &= 0x3F; // protection before too high value - - CLR(CE); - - SPDR = reg | RD;// zapis prvniho byte - while((SPSR & 0x80) != 0x80); - - - SPDR = 0; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - data = (SPDR << 8); - - - SPDR = 0; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - data |= SPDR; - - SET(CE); - - data &= andmask; - data |= ormask; - - CLR(CE); - - SPDR = reg | WR;// zapis prvniho byte - while((SPSR & 0x80) != 0x80); - - - SPDR = (data>>8) & 0xFF; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - - - SPDR = data & 0xFF; // zapis druhyho byte a cteni - while((SPSR & 0x80) != 0x80); - - SET(CE); -} diff --git a/board/arm/lpceurobot/app/minibee/uart_minibee.c b/board/arm/lpceurobot/app/minibee/uart_minibee.c deleted file mode 100644 index d08100e..0000000 --- a/board/arm/lpceurobot/app/minibee/uart_minibee.c +++ /dev/null @@ -1,113 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - - -/** - * @file uart_minibee.c - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Uart library - particulary platform dependent - * - */ - - -#include "MC1319xdef.h" - -#ifdef LPC - #include -#endif - - -/** - * Send one char to uart. - */ -void uart_send_char(char val) -{ - -#ifdef LPC - uart0SendCh(val); -#endif -} - -/** - * Read one char from uart. - */ -char uart_get_char(void) -{ - -#ifdef LPC - return uart0GetCh(); -#endif -} - -/** - * Initialize UART - platform dependent - */ -void init_uart(void) -{ -#ifdef LPC - init_uart0((int)9600, UART_BITS_8, UART_STOP_BIT_1, UART_PARIT_OFF, 0 ); -#endif -} - - -/** - * Send string to serial output in ASCII code. . - * @param data[] string to print - */ -void send_rs_str(char data[]) -{ - - int i = 0; - int j = 0; - - for (j = 0; j < 255; j++) - { - if(data[j] == 0) break; - } - - for (i= 0 ; i < j; i++) - { - uart_send_char(data[i]); - } -} - -/** - * Send int value to serial output in ASCII code. Removes unused zeros. - * @param val value to print - */ -void send_rs_int(int val) -{ - char dat[8]; - int i; - int pom = 0; - - for(i = 0; i < 8; i++) - { - dat[i] = (val & 0xF) + 0x30; - if(dat[i] > '9') - dat[i] += 7; - val >>= 4; - } - - for(i = 0; i < 8; i++) - { - if((pom == 0) & (dat[7-i] == '0')) - { - if((i == 6) | (i == 7)) - uart_send_char('0'); - continue; - } - pom = 1; - uart_send_char(dat[7-i]); - } - -} - - - - diff --git a/board/arm/lpceurobot/app/minibee/uart_minibee.h b/board/arm/lpceurobot/app/minibee/uart_minibee.h deleted file mode 100644 index 1221f90..0000000 --- a/board/arm/lpceurobot/app/minibee/uart_minibee.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Author: Bc. Jiri Kubias , (C) 2008 -// -// Copyright: (c) DCE FEE CTU - Department of Control Engeneering -// License: GNU GPL v.2 -// - -/** - * @file uart_minibee.h - * @author Bc. Jiri Kubias , DCE FEL CTU 2008 - * - * @brief Uart library - function prototypes - * - */ - -#ifndef UART_MINIBEE_H -#define UART_MINIBEE_H - -void uart_send_char(char val); -char uart_get_char(void); -void init_uart(void); -void send_rs_int(int val); -void send_rs_str(char data[]); - - - -#endif