浏览代码

Enable USB host power power switch

main
PaulStoffregen 8 年前
父节点
当前提交
10d5df3547
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      k66_usbhost.ino

+ 5
- 0
k66_usbhost.ino 查看文件

@@ -13,8 +13,13 @@ uint32_t inbuf[16] __attribute__ ((aligned(64)));

void setup()
{
// Test board has a USB data mux (this won't be on final Teensy 3.6)
pinMode(32, OUTPUT); // pin 32 = USB switch, high=connect device
digitalWrite(32, LOW);
// Teensy 3.6 has USB host power controlled by PTE6
PORTE_PCR6 = PORT_PCR_MUX(1);
GPIOE_PDDR |= (1<<6);
GPIOE_PSOR = (1<<6); // turn on USB host power
while (!Serial) ; // wait
print("USB Host Testing");
print_mpu();

正在加载...
取消
保存