embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
laser_comms.h
Go to the documentation of this file.
1 /*
2  * LaserComms.h
3  *
4  * Created on: Apr 13, 2018
5  * Author: Russell
6  */
7 
8 #ifndef LASERCOMMS_H_
9 #define LASERCOMMS_H_
10 
11 #include "timing.h"
12 #include "uart.h"
13 #include "project_settings.h"
14 #include "stdint.h"
15 
16 #define FIRE_BAUD_RATE 9600 //can be changed
17 #define SHOTS_PER_BURST 3
18 #define GUN_UART 1
19 #define MIN_LIMIT 100
20 
21 
22 
23 void LaserComms_Init(uint8_t playerid, void (* hit)(uint8_t), uint32_t limit);
24 
25 void LaserComms_Fire(void); //fire SHOTS_PER_BURST times
26 
27 void LaserComms_HitFilter(uint8_t enemyPlayer); //get hit, but only if not just hit
28 
29 #endif /* LASERCOMMS_H_ */
void LaserComms_HitFilter(uint8_t enemyPlayer)
Definition: laser_comms.c:125
void LaserComms_Init(uint8_t playerid, void(*hit)(uint8_t), uint32_t limit)
Definition: laser_comms.c:99
void LaserComms_Fire(void)
Definition: laser_comms.c:114