Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: teensy 4.0 error message whn using UTouch library

  1. #1

    teensy 4.0 error message whn using UTouch library

    when compiling with teensy 3.2 the program compiles OK however when compiling selecting the teensy 4.0 I get the error message:
    \Users\Ojamu\Documents\Arduino\libraries\UTouch\UTouch.cpp: In member function 'void UTouch::InitTouch(byte)':
    C:\Users\Ojamu\Documents\Arduino\libraries\UTouch\UTouch.cpp:57:8: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
      P_CLK = portOutputRegister(digitalPinToPort(T_CLK));
    The issue seems to be with the Utouch library and some typecasting incompatibility.
    I have an idea of whats happening but not sure how to resolve it

  2. #2
    You could try editing that line to P_CLK = (volatile uint8_t*)portOutputRegister(digitalPinToPort(T_CLK ));

    Might work if you don't have any other ideas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts