Hot!DRV_USART_Read9Bits -- Can't find prototype in any .h file

Author
user2x
Super Member
  • Total Posts : 210
  • Reward points : 0
  • Joined: 2011/02/10 20:43:36
  • Location: 0
  • Status: offline
2018/07/10 15:32:55 (permalink)
4 (1)

DRV_USART_Read9Bits -- Can't find prototype in any .h file

I am fixing up someone's code and I have a warning:
 
../src/UARThandlers.c:115:25: warning: implicit declaration of function 'DRV_USART_Read9Bits' [-Wimplicit-function-declaration]

 
I searched and the actual function is located in 
drv_usart_byte_model.c where it states:

 
// *****************************************************************************
/* Function:
uint16_t DRV_USART_Read9Bits( const DRV_HANDLE handle)
 
Summary:
Dynamic implementation of DRV_USART_Read9Bits client interface function.
 
Description:
This is the dynamic implementation of DRV_USART_Read9Bits client
interface function.
 
Remarks:
See drv_usart.h for usage information.
 

 
There is no protoype entry entry in drv_usart.h for this.
Should I just add it or what is the procedure?
I know 0.01 about Harmony.
 
Regards
X
#1

10 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 16436
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/10 16:05:03 (permalink)
    0
    What version of Harmony? if it is Not 2.06, then you will need to add the Missing prototype to your code, or the header.
    #2
    user2x
    Super Member
    • Total Posts : 210
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/10 18:33:20 (permalink)
    0
    How do I look up the harmony version in a project? 
    #3
    Paul PortSol
    Super Member
    • Total Posts : 331
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 03:45:30 (permalink)
    4 (1)
    I've never seen a hardware UART that can do 9bits in all my years. Closest is 8bits+Parity.
    I doubt this is supported in hardware.
    You could probably customize a "bit-bang" software implemented UART.
    For that you could use a timer interrupt of at least 3xBaudrate.
    Paul
     
    #4
    azaman
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2018/06/14 05:08:52
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 04:02:27 (permalink)
    0
    user2x
    How do I look up the harmony version in a project? 


     
    To check harmony version go to
    Tools -> Plugins -> Installed -> Microchip harmony configurator. There you can see the version in window on the right.



    #5
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 06:14:33 (permalink)
    0
    Paul PortSol
    I've never seen a hardware UART that can do 9bits in all my years. Closest is 8bits+Parity.
    I doubt this is supported in hardware.

    Every PIC USART peripheral I have looked at can do 9 bit data.
    The PIC32MX Family Reference Manual for the USART has a chapter titled "USING THE UART FOR 9-BIT COMMUNICATION"

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #6
    Jim Nickerson
    User 452
    • Total Posts : 5271
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 06:24:24 (permalink)
    4 (1)
    In this case 9 bit data is quite confusing, the 9th bit is used to indicate address or data when multiple devices are listening.
    #7
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 06:26:09 (permalink)
    3 (1)
    JANickerson
    In this case 9 bit data is quite confusing, the 9th bit is used to indicate address or data when multiple devices are listening.

    That's one possible use, controlled by the ADDEN flag, but there's nothing stopping you simply using it as a 9th data bit in a simple point to point connection.
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #8
    NKurzman
    A Guy on the Net
    • Total Posts : 16436
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 06:38:41 (permalink)
    0
    The Version of Harmony is "SYS_VERSION_STR" in system_config.h
    But it does not sound like you want to upgrade if you do not have to.
    Are you modifying a completed Project?, or picking up a partially done one?
    You posted the Function header.  Does it have code in it?
    If so my original advice stands.
    #9
    NKurzman
    A Guy on the Net
    • Total Posts : 16436
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 06:40:00 (permalink)
    5 (1)
    azaman
    user2x
    How do I look up the harmony version in a project? 


     
    To check harmony version go to
    Tools -> Plugins -> Installed -> Microchip harmony configurator. There you can see the version in window on the right.





    That is the Version of Harmony Installed in Mplab X, it is not necessarily the version that the Project was built with.
    #10
    user2x
    Super Member
    • Total Posts : 210
    • Reward points : 0
    • Joined: 2011/02/10 20:43:36
    • Location: 0
    • Status: offline
    Re: DRV_USART_Read9Bits -- Can't find prototype in any .h file 2018/07/11 14:46:31 (permalink)
    0
    Hi azaman
     
    Thanks for the help!
     
    I do not have that plugin showing as installed or available.
     
    How should I proceed? I still know 0 about this harmony stuff nor do I know how this project was created in the first place.
     
    Regards
    X
    #11
    Jump to:
    © 2018 APG vNext Commercial Version 4.5