Remove LED jumper and ISO jumper related code, as the presence of LEDs and ISO/ANSI configuration will be stored in the hardware configuration area of the EEPROM instead of using solder jumpers.

This commit is contained in:
László Monda
2017-01-05 19:25:39 +01:00
parent a817118eb3
commit ce1b16f406
12 changed files with 1 additions and 113 deletions

View File

@@ -5,7 +5,6 @@
#include "i2c.h"
#include "led_driver.h"
#include "merge_sensor.h"
#include "led_jumper.h"
void InitI2c() {
port_pin_config_t pinConfig = {
@@ -47,7 +46,6 @@ void InitI2c() {
void InitPeripherials(void)
{
InitResetButton();
InitLedJumper();
InitMergeSensor();
InitTestLed();
InitI2c();

View File

@@ -1,8 +0,0 @@
#include "led_jumper.h"
#include "fsl_port.h"
void InitLedJumper() {
CLOCK_EnableClock(LED_JUMPER_CLOCK);
PORT_SetPinConfig(LED_JUMPER_PORT, LED_JUMPER_PIN,
&(port_pin_config_t){.pullSelect=kPORT_PullUp, .mux=kPORT_MuxAsGpio});
}

View File

@@ -1,23 +0,0 @@
#ifndef __LED_JUMPER_H__
#define __LED_JUMPER_H__
// Includes:
#include "fsl_gpio.h"
// Macros:
#define LED_JUMPER_GPIO GPIOC
#define LED_JUMPER_PORT PORTC
#define LED_JUMPER_CLOCK kCLOCK_PortC
#define LED_JUMPER_PIN 4
#define LED_JUMPER_IRQ PORTC_IRQn
#define LED_JUMPER_IRQ_HANDLER PORTC_IRQHandler
#define LED_JUMPER_IS_ENABLED !GPIO_ReadPinInput(LED_JUMPER_GPIO, LED_JUMPER_PIN)
// Functions:
extern void InitLedJumper();
#endif

View File

@@ -4,7 +4,6 @@
#include "i2c_addresses.h"
#include "led_driver.h"
#include "merge_sensor.h"
#include "led_jumper.h"
void SetError(uint8_t error);
void SetGenericError();
@@ -17,8 +16,6 @@ void ReadLedDriver();
void WriteEeprom();
void ReadEeprom();
void ReadMergeSensor();
void ReadLedJumper();
void ReadIsoJumper();
// Functions for setting error statuses
@@ -68,12 +65,6 @@ void UsbProtocolHandler()
case USB_COMMAND_READ_MERGE_SENSOR:
ReadMergeSensor();
break;
case USB_COMMAND_READ_LED_JUMPER:
ReadLedJumper();
break;
case USB_COMMAND_READ_ISO_JUMPER:
ReadIsoJumper();
break;
default:
break;
}
@@ -180,19 +171,3 @@ void ReadMergeSensor()
{
SetResponseByte(MERGE_SENSOR_IS_MERGED);
}
void ReadLedJumper()
{
SetResponseByte(LED_JUMPER_IS_ENABLED);
}
void ReadIsoJumper()
{
uint8_t txBuffer[] = {2};
I2cWrite(I2C_MAIN_BUS_BASEADDR, I2C_ADDRESS_LEFT_KEYBOARD_HALF, txBuffer, sizeof(txBuffer));
uint8_t rxBuffer[1];
I2cRead(I2C_MAIN_BUS_BASEADDR, I2C_ADDRESS_LEFT_KEYBOARD_HALF, rxBuffer, sizeof(rxBuffer));
SetResponseByte(rxBuffer[0]);
}

View File

@@ -25,8 +25,6 @@
#define WRITE_EEPROM_RESPONSE_INVALID_PAYLOAD_SIZE 1
#define USB_COMMAND_READ_EEPROM 6
#define USB_COMMAND_READ_MERGE_SENSOR 7
#define USB_COMMAND_READ_LED_JUMPER 8
#define USB_COMMAND_READ_ISO_JUMPER 9
// Functions: