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:
@ -98,6 +98,8 @@
|
||||
// Types
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
typedef int8_t pin_t;
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Public Variables
|
||||
// --------------------------------------------------------------------------
|
||||
@ -192,4 +194,8 @@ void HAL_enable_AdcFreerun(void);
|
||||
|
||||
*/
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
||||
|
||||
#endif // _HAL_STM32F1_H
|
||||
|
@ -43,7 +43,7 @@
|
||||
*/
|
||||
#define FORCE_INLINE __attribute__((always_inline)) inline
|
||||
|
||||
#define HAL_TIMER_TYPE uint16_t
|
||||
typedef uint16_t timer_t;
|
||||
#define HAL_TIMER_TYPE_MAX 0xFFFF
|
||||
|
||||
#define STEP_TIMER_NUM 5 // index of timer to use for stepper
|
||||
@ -126,8 +126,8 @@ static FORCE_INLINE void HAL_timer_set_count (uint8_t timer_num, uint32_t count)
|
||||
}
|
||||
}
|
||||
|
||||
static FORCE_INLINE HAL_TIMER_TYPE HAL_timer_get_count (uint8_t timer_num) {
|
||||
HAL_TIMER_TYPE temp;
|
||||
static FORCE_INLINE timer_t HAL_timer_get_count (uint8_t timer_num) {
|
||||
timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
temp = StepperTimer.getCompare(STEP_TIMER_CHAN);
|
||||
@ -142,8 +142,8 @@ static FORCE_INLINE HAL_TIMER_TYPE HAL_timer_get_count (uint8_t timer_num) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
static FORCE_INLINE HAL_TIMER_TYPE HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
HAL_TIMER_TYPE temp;
|
||||
static FORCE_INLINE timer_t HAL_timer_get_current_count(uint8_t timer_num) {
|
||||
timer_t temp;
|
||||
switch (timer_num) {
|
||||
case STEP_TIMER_NUM:
|
||||
temp = StepperTimer.getCount();
|
||||
|
Reference in New Issue
Block a user