Rename channel ports to their actual channel names
This commit is contained in:
		@ -13,27 +13,27 @@
 | 
			
		||||
typedef union {
 | 
			
		||||
  struct {
 | 
			
		||||
    uint8_t NC : 1;
 | 
			
		||||
    uint8_t en13 : 1;     // inverters
 | 
			
		||||
    uint8_t en2 : 1;      //servos regler
 | 
			
		||||
    uint8_t en1 : 1;      //acu
 | 
			
		||||
    uint8_t en4 : 1;      // reserved
 | 
			
		||||
    uint8_t en11 : 1;      //lidar
 | 
			
		||||
    uint8_t en8 : 1;      // sdc
 | 
			
		||||
    uint8_t alwayson : 1; // en7 ist always on 
 | 
			
		||||
    uint8_t inverter : 1;
 | 
			
		||||
    uint8_t drs_buck : 1;
 | 
			
		||||
    uint8_t acu : 1;
 | 
			
		||||
    uint8_t reserved : 1;
 | 
			
		||||
    uint8_t lidar : 1;
 | 
			
		||||
    uint8_t sdc : 1;
 | 
			
		||||
    uint8_t alwayson : 1;
 | 
			
		||||
  };
 | 
			
		||||
  uint8_t porta;
 | 
			
		||||
} gpio_port_a;
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
  struct {
 | 
			
		||||
    uint8_t en15: 1;      // epsc
 | 
			
		||||
    uint8_t en12 : 1;     // hyd aggregat 
 | 
			
		||||
    uint8_t epsc: 1;
 | 
			
		||||
    uint8_t hyd_pump : 1;
 | 
			
		||||
    uint8_t NC : 1;       
 | 
			
		||||
    uint8_t en3 : 1;      // ebs cs valve
 | 
			
		||||
    uint8_t en6 : 1;      // ebs valve b
 | 
			
		||||
    uint8_t en5 : 1;     //ebs valve a
 | 
			
		||||
    uint8_t en14 : 1;    //servos
 | 
			
		||||
    uint8_t en16 : 1;     //misc
 | 
			
		||||
    uint8_t ebs_cs : 1;
 | 
			
		||||
    uint8_t ebs_b : 1;
 | 
			
		||||
    uint8_t ebs_a : 1;
 | 
			
		||||
    uint8_t drs_profet : 1;
 | 
			
		||||
    uint8_t misc : 1;
 | 
			
		||||
  };
 | 
			
		||||
  uint8_t portb;
 | 
			
		||||
} gpio_port_b;
 | 
			
		||||
 | 
			
		||||
@ -38,8 +38,9 @@ void ChannelControl_init(I2C_HandleTypeDef* hi2c, TIM_HandleTypeDef* timer3,
 | 
			
		||||
void ChannelControl_UpdateGPIOs(PortExtenderGPIO UpdatePorts) { // ctrl + left click auf portextender 
 | 
			
		||||
  EN_Ports = UpdatePorts;
 | 
			
		||||
  UpdatePorts.porta.alwayson = 1; // Always on stays always on
 | 
			
		||||
  if (inhibit_SDC)
 | 
			
		||||
    UpdatePorts.porta.en8 = 0;
 | 
			
		||||
  if (inhibit_SDC) {
 | 
			
		||||
    UpdatePorts.porta.sdc = 0;
 | 
			
		||||
  }
 | 
			
		||||
  PCA9535_setGPIOPortOutput(PC9535_PORTA, UpdatePorts.porta.porta);
 | 
			
		||||
  PCA9535_setGPIOPortOutput(PC9535_PORTB, UpdatePorts.portb.portb);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user