66 lines
		
	
	
		
			958 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			958 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /**
 | |
|  * @author Rémi Heredero
 | |
|  * @version. 0.0.0
 | |
|  * @date August 2023
 | |
|  * @file factory.h
 | |
|  */
 | |
| 
 | |
| 
 | |
| #ifndef FACTORY_H
 | |
| #define FACTORY_H
 | |
| 
 | |
| #include <stdint.h>
 | |
| #include <stdbool.h>
 | |
| 
 | |
| #include "../car.h"
 | |
| #include "../can_message.h"
 | |
| #include "../eeprom.h"
 | |
| #include "../drive.h"
 | |
| #include "../../board/led/led.h"
 | |
| #include "../../board/button/button.h"
 | |
| #include "../../middleware/alive.h"
 | |
| #include "../../middleware/can_interface.h"
 | |
| #include "../../middleware/blinker.h"
 | |
| 
 | |
| 
 | |
| typedef struct {
 | |
|     LED l1_;
 | |
|     LED l2_;
 | |
|     LED l3_;
 | |
|     LED l4_;
 | |
|     LED l5_;
 | |
|     LED l6_;
 | |
|     LED l7_;
 | |
|     LED l8_;
 | |
|     
 | |
|     BLINKER b1_;
 | |
|     
 | |
|     ALIVE ALcontroller_;
 | |
|     ALIVE ALjoy_;
 | |
|     DRIVE drive_;
 | |
| 
 | |
| } Factory;
 | |
| 
 | |
| 
 | |
| void Factory_init();
 | |
| void Factory_build();
 | |
| void Factory_start();
 | |
| 
 | |
| //these are global getters for our objects
 | |
| LED* l1();
 | |
| LED* l2();
 | |
| LED* l3();
 | |
| LED* l4();
 | |
| LED* l5();
 | |
| LED* l6();
 | |
| LED* l7();
 | |
| LED* l8();
 | |
| 
 | |
| BLINKER* b1();
 | |
| 
 | |
| ALIVE* ALcontroller();
 | |
| ALIVE* ALjoy();
 | |
| DRIVE* drive();
 | |
| 
 | |
| 
 | |
| #endif |