Add interrupt
This commit is contained in:
parent
207b889fef
commit
4d6a5f8700
123 changed files with 1181239 additions and 1181234 deletions
|
@ -1,36 +1,36 @@
|
|||
#pragma once
|
||||
#include "config.h"
|
||||
#include "STM32_CAN.h"
|
||||
#include "flash.h"
|
||||
#include "reg_cah.h"
|
||||
|
||||
#define CAN_TIMEOUT 50
|
||||
#define CAN_SILENCE_TIMEOUT 500
|
||||
#define MAX_CAN_READS 2
|
||||
extern FLASH_RECORD *flash_rec;
|
||||
extern volatile uint16_t msg_id;
|
||||
extern volatile uint16_t id_x;
|
||||
extern volatile uint8_t msg_ch;
|
||||
extern volatile uint8_t crc_h;
|
||||
extern volatile uint8_t crc_l;
|
||||
extern volatile bool send_blocked;
|
||||
|
||||
static volatile bool need_send_angle = false;
|
||||
static volatile bool need_send_velocity = false;
|
||||
|
||||
void send_velocity();
|
||||
void send_angle();
|
||||
void send_motor_enabled();
|
||||
void send_motor_enabled();
|
||||
void send_id();
|
||||
void firmware_update();
|
||||
void send_pid_angle(uint8_t param_pid);
|
||||
void send_with_confirmation(void (*send_func)(void));
|
||||
// void send_torque();
|
||||
void send_pid(uint8_t param_pid);
|
||||
void setup_id(uint8_t my_id);
|
||||
void setup_angle(float target_angle);
|
||||
void setup_velocity(float target_velocity);
|
||||
void process_can_messages();
|
||||
|
||||
void listen_can(const CAN_message_t &msg);
|
||||
#pragma once
|
||||
#include "config.h"
|
||||
#include "STM32_CAN.h"
|
||||
#include "flash.h"
|
||||
#include "reg_cah.h"
|
||||
|
||||
#define CAN_TIMEOUT 5
|
||||
#define CAN_SILENCE_TIMEOUT 5
|
||||
#define MAX_CAN_READS 2
|
||||
extern FLASH_RECORD *flash_rec;
|
||||
extern volatile uint16_t msg_id;
|
||||
extern volatile uint16_t id_x;
|
||||
extern volatile uint8_t msg_ch;
|
||||
extern volatile uint8_t crc_h;
|
||||
extern volatile uint8_t crc_l;
|
||||
extern volatile bool send_blocked;
|
||||
|
||||
static volatile bool need_send_angle = false;
|
||||
static volatile bool need_send_velocity = false;
|
||||
|
||||
void send_velocity();
|
||||
void send_angle();
|
||||
void send_motor_enabled();
|
||||
void send_motor_enabled();
|
||||
void send_id();
|
||||
void firmware_update();
|
||||
void send_pid_angle(uint8_t param_pid);
|
||||
void send_with_confirmation(void (*send_func)(void));
|
||||
// void send_torque();
|
||||
void send_pid(uint8_t param_pid);
|
||||
void setup_id(uint8_t my_id);
|
||||
void setup_angle(float target_angle);
|
||||
void setup_velocity(float target_velocity);
|
||||
void process_can_messages();
|
||||
|
||||
void listen_can(const CAN_message_t &msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue