LPC1768 HAL formatting/comments
This commit is contained in:
parent
424b9a83cd
commit
799e3b2b40
8 changed files with 39 additions and 64 deletions
|
@ -21,13 +21,12 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Description: HAL for Arduino Due and compatible (SAM3X8E)
|
||||
*
|
||||
* For ARDUINO_ARCH_SAM
|
||||
* HAL_LPC1768/HAL.h
|
||||
* Hardware Abstraction Layer for NXP LPC1768
|
||||
*/
|
||||
|
||||
#ifndef _HAL_LPC1768_H
|
||||
#define _HAL_LPC1768_H
|
||||
#ifndef _HAL_LPC1768_H_
|
||||
#define _HAL_LPC1768_H_
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Includes
|
||||
|
@ -141,4 +140,4 @@ void HAL_adc_enable_channel(int pin);
|
|||
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
||||
uint16_t HAL_adc_get_result(void);
|
||||
|
||||
#endif // _HAL_LPC1768_H
|
||||
#endif // _HAL_LPC1768_H_
|
||||
|
|
|
@ -20,12 +20,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
void u8g_i2c_init(uint8_t options);
|
||||
uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos);
|
||||
uint8_t u8g_i2c_start(uint8_t sla);
|
||||
uint8_t u8g_i2c_send_byte(uint8_t data);
|
||||
void u8g_i2c_stop(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,16 +29,12 @@
|
|||
* one microsecond delay being about 4uS.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void U8g_delay(int msec);
|
||||
|
||||
void u8g_MicroDelay(void);
|
||||
|
||||
void u8g_10MicroDelay(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -30,18 +30,7 @@
|
|||
* resulted in using about about 25% of the CPU's time.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void u8g_SetPinOutput(uint8_t internal_pin_number);
|
||||
|
||||
void u8g_SetPinInput(uint8_t internal_pin_number);
|
||||
|
||||
void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status);
|
||||
|
||||
uint8_t u8g_GetPinLevel(uint8_t pin);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
* LPC1768 LCD-specific defines
|
||||
*/
|
||||
|
||||
#ifdef TARGET_LPC1768
|
||||
|
||||
// pointers to low level routines - must always supply these
|
||||
//#define U8G_HAL_LINKS
|
||||
#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_FAST_PARALLEL u8g_com_null_fn
|
||||
#define U8G_COM_UC_I2C u8g_com_null_fn
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef TARGET_LPC1768
|
||||
#include <stdint.h>
|
||||
|
|
|
@ -116,9 +116,7 @@ int main(void) {
|
|||
LPC1768_PWM_init();
|
||||
|
||||
setup();
|
||||
while (true) {
|
||||
loop();
|
||||
}
|
||||
for (;;) loop();
|
||||
}
|
||||
|
||||
#endif // TARGET_LPC1768
|
||||
|
|
Reference in a new issue