Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

main.cpp

Committer:
aniruddhv
Date:
2016-01-14
Revision:
52:0bd68655c651
Parent:
7:fcd26c28411d
Child:
54:199040d70b17
Child:
67:4819b5f28285
Child:
71:9193fbdaa3e1
Child:
82:c55f29ad4240
Child:
84:b0f7a241ddf3

File content as of revision 52:0bd68655c651:

// TESTING PUSH PULL IN MAIN CPP

#include "mbed.h"
#include "rtos.h"
#include "mbed_debug.h"

#include "Structures.h"
#include "DefinitionsAndGlobals.h"
#include "crc.h"
#include "COM_SND_TM_functions.h"
#include "COM_SND_TM.h"
#include "SDCread.h"
#include "adf.h"
#include "Compression.h"
#include "SDC_init.h"
#include "COM_RCV_TC.h"
#include "COM_MNG_TMTC.h"
#include "COM_POWER_ON_TX.h"
#include "COM_POWER_OFF_TX.h"
#include "ThreadsAndFunctions.h"

int main()
{
    // ******************INITIALISATIONS START******************
    // COM RX
    RX1M.baud(1200);
    gRX_HEAD_DATA_NODE = new COM_RX_DATA_NODE;
    gRX_HEAD_DATA_NODE->next_node = NULL;
    gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE;
    gRX_COUNT = 0;
//    gRX_CURRENT_PTR = gRX_CURRENT_DATA_NODE->values;
    RX1M.attach(&rx_read, Serial::RxIrq);
    
    // DEBUG
//    gPC.puts("welcome to mng_tm_tc\r\n");
    gPC.baud(1200);
    
    // COMMON SPI
    spi.format(8,0);
    spi.frequency(1000000);

    // SD CARD
    gCS_SDC = 1;
    gCS_RTC = 1;
    // initialise_card();
    // int result= initialise_card();
    // disk_initialize();    
    
    // COM_TX
    // *********************THE TEST
    // cs_adf=1;
    // *********************THE TEST

    // COM_MNG_TMTC THREAD
    gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN);
    gCOM_MNG_TMTC_THREAD->set_priority(osPriorityAboveNormal);
    // *******************INITIALISATIONS END********************
    
    int theAcount = 0;
    while(true){
        Thread::wait(osWaitForever);
    }
}