Browse Source

LPC1768 HAL formatting/comments

pull/1/head
Scott Lahteine 7 years ago
parent
commit
799e3b2b40
  1. 11
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  2. 4
      Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.h
  3. 4
      Marlin/src/HAL/HAL_LPC1768/HAL_LCD_delay.h
  4. 11
      Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.h
  5. 4
      Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h
  6. 1
      Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h
  7. 4
      Marlin/src/HAL/HAL_LPC1768/main.cpp

11
Marlin/src/HAL/HAL_LPC1768/HAL.h

@ -21,13 +21,12 @@
*/ */
/** /**
* Description: HAL for Arduino Due and compatible (SAM3X8E) * HAL_LPC1768/HAL.h
* * Hardware Abstraction Layer for NXP LPC1768
* For ARDUINO_ARCH_SAM
*/ */
#ifndef _HAL_LPC1768_H #ifndef _HAL_LPC1768_H_
#define _HAL_LPC1768_H #define _HAL_LPC1768_H_
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Includes // Includes
@ -141,4 +140,4 @@ void HAL_adc_enable_channel(int pin);
void HAL_adc_start_conversion(const uint8_t adc_pin); void HAL_adc_start_conversion(const uint8_t adc_pin);
uint16_t HAL_adc_get_result(void); uint16_t HAL_adc_get_result(void);
#endif // _HAL_LPC1768_H #endif // _HAL_LPC1768_H_

4
Marlin/src/HAL/HAL_LPC1768/HAL_LCD_I2C_routines.h

@ -20,12 +20,8 @@
* *
*/ */
#ifdef TARGET_LPC1768
void u8g_i2c_init(uint8_t options); void u8g_i2c_init(uint8_t options);
uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos); uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos);
uint8_t u8g_i2c_start(uint8_t sla); uint8_t u8g_i2c_start(uint8_t sla);
uint8_t u8g_i2c_send_byte(uint8_t data); uint8_t u8g_i2c_send_byte(uint8_t data);
void u8g_i2c_stop(void); void u8g_i2c_stop(void);
#endif

4
Marlin/src/HAL/HAL_LPC1768/HAL_LCD_delay.h

@ -29,16 +29,12 @@
* one microsecond delay being about 4uS. * one microsecond delay being about 4uS.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void U8g_delay(int msec); void U8g_delay(int msec);
void u8g_MicroDelay(void); void u8g_MicroDelay(void);
void u8g_10MicroDelay(void); void u8g_10MicroDelay(void);
#ifdef __cplusplus #ifdef __cplusplus

11
Marlin/src/HAL/HAL_LPC1768/HAL_LCD_pin_routines.h

@ -30,18 +30,7 @@
* resulted in using about about 25% of the CPU's time. * resulted in using about about 25% of the CPU's time.
*/ */
void u8g_SetPinOutput(uint8_t internal_pin_number); void u8g_SetPinOutput(uint8_t internal_pin_number);
void u8g_SetPinInput(uint8_t internal_pin_number); void u8g_SetPinInput(uint8_t internal_pin_number);
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status); void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status);
uint8_t u8g_GetPinLevel(uint8_t pin); uint8_t u8g_GetPinLevel(uint8_t pin);

4
Marlin/src/HAL/HAL_LPC1768/HAL_LPC1768_LCD_defines.h

@ -24,8 +24,6 @@
* LPC1768 LCD-specific defines * LPC1768 LCD-specific defines
*/ */
#ifdef TARGET_LPC1768
// pointers to low level routines - must always supply these // pointers to low level routines - must always supply these
//#define U8G_HAL_LINKS //#define U8G_HAL_LINKS
#define HAL_LCD_pin_routines "HAL_LPC1768/HAL_LCD_pin_routines.h" #define HAL_LCD_pin_routines "HAL_LPC1768/HAL_LCD_pin_routines.h"
@ -54,5 +52,3 @@
#define U8G_COM_T6963 u8g_com_null_fn #define U8G_COM_T6963 u8g_com_null_fn
#define U8G_COM_FAST_PARALLEL u8g_com_null_fn #define U8G_COM_FAST_PARALLEL u8g_com_null_fn
#define U8G_COM_UC_I2C u8g_com_null_fn #define U8G_COM_UC_I2C u8g_com_null_fn
#endif

1
Marlin/src/HAL/HAL_LPC1768/LPC_SPI.h

@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
#pragma once #pragma once
#ifdef TARGET_LPC1768 #ifdef TARGET_LPC1768
#include <stdint.h> #include <stdint.h>

4
Marlin/src/HAL/HAL_LPC1768/main.cpp

@ -116,9 +116,7 @@ int main(void) {
LPC1768_PWM_init(); LPC1768_PWM_init();
setup(); setup();
while (true) { for (;;) loop();
loop();
}
} }
#endif // TARGET_LPC1768 #endif // TARGET_LPC1768

Loading…
Cancel
Save