Make LPC1768 pinmapping not specific to Re-ARM (#8063)
* Merging early because of build failures. See #8105 * Make LPC1768 pinmapping not specific to Re-ARM * Add HAL_PIN_TYPE and LPC1768 pin features * M43 Updates * Move pin map into pinsDebug_LPC1768.h * Incorporate comments and M226 * Fix persistent store compilation issues * Update pin features * Update MKS SBASE pins * Use native LPC1768 pin numbers in M42, M43, and M226
This commit is contained in:
@ -66,9 +66,11 @@
|
||||
// Types
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#define HAL_TIMER_TYPE uint16_t
|
||||
typedef uint16_t timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
|
||||
typedef int8_t pin_t;
|
||||
|
||||
#define HAL_SERVO_LIB Servo
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@ -153,4 +155,10 @@ inline void HAL_adc_init(void) {
|
||||
|
||||
#define HAL_READ_ADC ADC
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
#define HAL_SENSITIVE_PINS 0, 1
|
||||
|
||||
#endif // _HAL_AVR_H_
|
||||
|
@ -82,7 +82,7 @@ void HAL_analog_pin_state(char buffer[], int8_t pin) {
|
||||
|
||||
typedef struct {
|
||||
const char * const name;
|
||||
uint8_t pin;
|
||||
pin_t pin;
|
||||
bool is_digital;
|
||||
} PinInfo;
|
||||
|
||||
@ -457,7 +457,7 @@ static void print_input_or_output(const bool isout) {
|
||||
}
|
||||
|
||||
// pretty report with PWM info
|
||||
inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = false, const char *start_string = "") {
|
||||
inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = false, const char *start_string = "") {
|
||||
uint8_t temp_char;
|
||||
char *name_mem_pointer, buffer[30]; // for the sprintf statements
|
||||
bool found = false, multi_name_pin = false;
|
||||
|
@ -397,6 +397,6 @@ static void pwm_details(uint8_t pin) {
|
||||
|
||||
#endif
|
||||
|
||||
#define GET_PIN_INFO(pin) do{}while(0)
|
||||
#define PRINT_PIN(p) do {sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer);} while (0)
|
||||
|
||||
#endif // _PINSDEBUG_AVR_8_BIT_
|
||||
|
Reference in New Issue
Block a user