peripherals: Commented out until fixed.

Peripherals were following old lpc chip pinout (lpc15xx). We have different (lpc11u6x). I decided to comment them out until we figure out correct pinout. (project should always build in master)
This commit is contained in:
RedHawk 2023-04-06 11:12:47 +03:00
parent 67579db883
commit c662936689
10 changed files with 86 additions and 1 deletions

View File

@ -7,6 +7,10 @@
#include "DigitalIoPin.h"
// Remove this when code will be reworked.
#ifndef DIGITALIOPIN_NOT_FIXED
// Remove this when code will be reworked.
DigitalIoPin::DigitalIoPin (int port, int pin, bool input, bool pullup,
bool invert)
{
@ -62,3 +66,6 @@ DigitalIoPin::write (bool value)
Chip_GPIO_SetPinState (LPC_GPIO, _io._port, _io._pin, ((_io._invert) ? !value : value));
}
//Remove this when code will be reworked.
#endif /* DIGITALIOPIN_NOT_FIXED */
//Remove this when code will be reworked.

View File

@ -8,6 +8,11 @@
#ifndef DIGITALIOPIN_H_
#define DIGITALIOPIN_H_
// Remove this when code will be reworked.
#define DIGITALIOPIN_NOT_FIXED
#ifndef DIGITALIOPIN_NOT_FIXED
// Remove this when code will be reworked.
#define UINT8_MAX_VALUE 255
#include <assert.h>
@ -40,4 +45,8 @@ private:
void setIoPin ();
};
//Remove this when code will be reworked.
#endif /* DIGITALIOPIN_NOT_FIXED */
//Remove this when code will be reworked.
#endif /* DIGITALIOPIN_H_ */

View File

@ -7,6 +7,10 @@
#include <EEPROMWrapper.h>
// Remove this when code will be reworked.
#ifndef EEPROMWRAPPER_NOT_FIXED
// Remove this when code will be reworked.
EEPROM_Wrapper::EEPROM_Wrapper ()
{
/* Enable EEPROM clock and reset EEPROM controller */
@ -93,3 +97,7 @@ EEPROM_Wrapper::write_to (uint32_t addr, void *data, uint32_t size_of_data)
e_memcpy (data, buffer, size_of_data);
eeprom_use (buffer, addr, size_of_data, WRITE);
}
// Remove this when code will be reworked.
#endif /* EEPROMWRAPPER_NOT_FIXED */
// Remove this when code will be reworked.

View File

@ -8,6 +8,12 @@
#ifndef EEPROMWRAPPER_H_
#define EEPROMWRAPPER_H_
// Remove this when code will be reworked.
#define EEPROMWRAPPER_NOT_FIXED
#ifndef EEPROMWRAPPER_NOT_FIXED
// Remove this when code will be reworked.
#include "FreeRTOS.h"
#include "task.h"
#include "chip.h"
@ -80,4 +86,8 @@ private:
uint8_t buffer[EEPROM_MAX_BUFER_SIZE] = { 0 };
};
// Remove this when code will be reworked.
#endif /* EEPROMWRAPPER_NOT_FIXED */
// Remove this when code will be reworked.
#endif /* EEPROMWRAPPER_H_ */

View File

@ -40,6 +40,10 @@
#include "I2C.h"
// Remove this when code will be reworked.
#ifndef I2C_NOT_FIXED
// Remove this when code will be reworked.
I2C::I2C (const I2C_config &cfg) : device (nullptr)
{
// if(cfg.device_number == 0) {
@ -158,3 +162,7 @@ I2C::I2CM_XferBlocking (LPC_I2C_T *pI2C, I2CM_XFER_T *xfer)
}
return ret;
}
// Remove this when code will be reworked.
#endif /* I2C_NOT_FIXED */
// Remove this when code will be reworked.

View File

@ -8,6 +8,11 @@
#ifndef I2C_H_
#define I2C_H_
// Remove this when code will be reworked.
#define I2C_NOT_FIXED
#ifndef I2C_NOT_FIXED
// Remove this when code will be reworked.
#include "chip.h"
struct I2C_config {
@ -30,4 +35,8 @@ private:
static uint32_t I2CM_XferBlocking(LPC_I2C_T *pI2C, I2CM_XFER_T *xfer);
};
// Remove this when code will be reworked.
#endif /* I2C_NOT_FIXED */
// Remove this when code will be reworked.
#endif /* I2C_H_ */

View File

@ -1,5 +1,10 @@
#include "LiquidCrystal.h"
// Remove this when code will be reworked.
#ifndef LiquidCrystal_NOT_FIXED
// Remove this when code will be reworked.
#include <cstring>
#include "chip.h"
@ -287,3 +292,6 @@ void LiquidCrystal::write4bits(uint8_t value) {
pulseEnable();
}
// Remove this when code will be reworked.
#endif /* LiquidCrystal_NOT_FIXED */
// Remove this when code will be reworked.

View File

@ -1,6 +1,10 @@
#ifndef LiquidCrystal_h
#define LiquidCrystal_h
// Remove this when code will be reworked.
#define LiquidCrystal_NOT_FIXED
#ifndef LiquidCrystal_NOT_FIXED
// Remove this when code will be reworked.
#include <cstddef>
#include <string>
@ -94,4 +98,8 @@ private:
uint8_t _numlines,_currline;
};
#endif
// Remove this when code will be reworked.
#endif /* LiquidCrystal_NOT_FIXED */
// Remove this when code will be reworked.
#endif /* LiquidCrystal_h */

View File

@ -9,6 +9,10 @@
#include <mutex>
#include "LpcUart.h"
// Remove this when code will be reworked.
#ifndef LPCUART_NOT_FIXED
// Remove this when code will be reworked.
static LpcUart *u0;
static LpcUart *u1;
@ -313,3 +317,7 @@ bool LpcUart::txempty()
return (RingBuffer_GetCount(&txring) == 0);
}
// Remove this when code will be reworked.
#endif /* LPCUART_NOT_FIXED */
// Remove this when code will be reworked.

View File

@ -8,6 +8,12 @@
#ifndef LPCUART_H_
#define LPCUART_H_
// Remove this when code will be reworked.
#define LPCUART_NOT_FIXED
#ifndef LPCUART_NOT_FIXED
// Remove this when code will be reworked.
#include "chip.h"
#include "FreeRTOS.h"
#include "task.h"
@ -69,4 +75,8 @@ private:
Fmutex write_mutex;
};
// Remove this when code will be reworked.
#endif /* LPCUART_NOT_FIXED */
// Remove this when code will be reworked.
#endif /* LPCUART_H_ */