Pārlūkot izejas kodu

Even more defs

teensy4-core
PaulStoffregen pirms 8 gadiem
vecāks
revīzija
c364608480
10 mainītis faili ar 47 papildinājumiem un 8 dzēšanām
  1. +5
    -1
      teensy3/core_pins.h
  2. +3
    -0
      teensy3/mk20dx128.c
  3. +5
    -1
      teensy3/pins_teensy.c
  4. +4
    -0
      teensy3/touch.c
  5. +5
    -1
      teensy3/usb_joystick.c
  6. +5
    -1
      teensy3/usb_keyboard.c
  7. +5
    -1
      teensy3/usb_midi.c
  8. +5
    -1
      teensy3/usb_mouse.c
  9. +5
    -1
      teensy3/usb_seremu.c
  10. +5
    -1
      teensy3/usb_serial.c

+ 5
- 1
teensy3/core_pins.h Parādīt failu

@@ -1535,7 +1535,11 @@ uint32_t micros(void);
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
static inline void delayMicroseconds(uint32_t usec)
{
#if F_CPU == 168000000
#if F_CPU == 192000000
uint32_t n = usec * 64;
#elif F_CPU == 180000000
uint32_t n = usec * 60;
#elif F_CPU == 168000000
uint32_t n = usec * 56;
#elif F_CPU == 144000000
uint32_t n = usec * 48;

+ 3
- 0
teensy3/mk20dx128.c Parādīt failu

@@ -716,6 +716,9 @@ void ResetHandler(void)
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
SCB_CPACR = 0x00F00000;
#endif
#if defined(__MK66FX1M0__)
LMEM_PCCCR = 0x85000003;
#endif
#if 0
// testing only, enable ser_print
SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIV1(0) | SIM_CLKDIV1_OUTDIV4(1);

+ 5
- 1
teensy3/pins_teensy.c Parādīt failu

@@ -1111,7 +1111,11 @@ void delay(uint32_t ms)
}

// TODO: verify these result in correct timeouts...
#if F_CPU == 168000000
#if F_CPU == 192000000
#define PULSEIN_LOOPS_PER_USEC 29
#elif F_CPU == 180000000
#define PULSEIN_LOOPS_PER_USEC 27
#elif F_CPU == 168000000
#define PULSEIN_LOOPS_PER_USEC 25
#elif F_CPU == 144000000
#define PULSEIN_LOOPS_PER_USEC 21

+ 4
- 0
teensy3/touch.c Parādīt failu

@@ -78,6 +78,9 @@ static const uint8_t pin2tsi[] = {

int touchRead(uint8_t pin)
{
#if defined(__MK64FX512__)
return 0; // no Touch sensing :(
#else
uint32_t ch;

if (pin >= NUM_DIGITAL_PINS) return 0;
@@ -104,6 +107,7 @@ int touchRead(uint8_t pin)
delayMicroseconds(1);
return TSI0_DATA & 0xFFFF;
#endif
#endif
}



+ 5
- 1
teensy3/usb_joystick.c Parādīt failu

@@ -48,7 +48,11 @@ static uint8_t transmit_previous_timeout=0;
// When the PC isn't listening, how long do we wait before discarding data?
#define TX_TIMEOUT_MSEC 30

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

+ 5
- 1
teensy3/usb_keyboard.c Parādīt failu

@@ -449,7 +449,11 @@ static uint8_t transmit_previous_timeout=0;
// When the PC isn't listening, how long do we wait before discarding data?
#define TX_TIMEOUT_MSEC 50

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

+ 5
- 1
teensy3/usb_midi.c Parādīt failu

@@ -64,7 +64,11 @@ static uint8_t tx_noautoflush=0;
// When the PC isn't listening, how long do we wait before discarding data?
#define TX_TIMEOUT_MSEC 40

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

+ 5
- 1
teensy3/usb_mouse.c Parādīt failu

@@ -115,7 +115,11 @@ static uint8_t transmit_previous_timeout=0;
// When the PC isn't listening, how long do we wait before discarding data?
#define TX_TIMEOUT_MSEC 30

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

+ 5
- 1
teensy3/usb_seremu.c Parādīt failu

@@ -139,7 +139,11 @@ void usb_seremu_flush_input(void)
// software. If it's too long, we stall the user's program when no software is running.
#define TX_TIMEOUT_MSEC 30

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

+ 5
- 1
teensy3/usb_serial.c Parādīt failu

@@ -149,7 +149,11 @@ void usb_serial_flush_input(void)
// software. If it's too long, we stall the user's program when no software is running.
#define TX_TIMEOUT_MSEC 70

#if F_CPU == 168000000
#if F_CPU == 192000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1280)
#elif F_CPU == 180000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1200)
#elif F_CPU == 168000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 1100)
#elif F_CPU == 144000000
#define TX_TIMEOUT (TX_TIMEOUT_MSEC * 932)

Notiek ielāde…
Atcelt
Saglabāt