11

Dependencies:   mbed-dev-f303

main.cpp

Committer:
yezhong
Date:
2021-08-06
Revision:
2:9418258519ea
Parent:
0:dd5d4837292c

File content as of revision 2:9418258519ea:

#include "mbed.h"
#include <cstring>
#include "math_ops.h"
#include "leg_message.h"
#include "CAN.h"
#include "used_leg_message.h"
#include "data_pc.h"
#include "data_board.h"
#include "mode.h"
#include "data_command.h"
#include "math_ops.h"
#include "fuzzy.h"
#include "calculate.h"
#include "timer.h"



////////////////////////////////////////////////////////////////////////////////
//                           PID调试                          //
////////////////////////////////////////////////////////////////////////////////


int main()
{
     // Timer ttt;
     
      
////////////////////////初始化//////////////////////////////////////
    pc.baud(115200);                                                            // U2
    

    foot.baud(115200);                                                          // U1
    foot.attach(&serial_board_isr);

   // command.baud(115200);                                                       // U3
   // command.attach(&serial_command_isr);
    

  
////////////////////////////////////////////////////////////////////////////////

    NVIC_SetPriority(USART1_IRQn, 1);                                           // command中断优先级高于board
    NVIC_SetPriority(USART3_IRQn, 3);
      
       
    
    while(1) {   
    /*
       ttt.start(); 
       ttt.read();
       if(ttt.read()>2)
       {
         pc.printf("Helloee\n");  
        ttt.reset();   
        } 
        */   
    }
}