AnsweredLockedHot!Using Microchip Copyrighted Struct/enums in PC library

Author
hadleyrobotics
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2017/12/02 17:40:47
  • Location: 0
  • Status: offline
2017/12/07 12:16:45 (permalink)
0

Using Microchip Copyrighted Struct/enums in PC library

There are structs and enums in the serial and CAN header files from the PIC32MX XC32 legacy library that I'd like to use in a closed source commercial Ethernet library (although this header file which I call microchip_types.h will be completely visible in an include directory of the Ethernet library).  The library that would use microchip_types.h would be for serial and CAN over Ethernet on Linux and Windows.  I also am using microchip_types.h in a Managed C++ library for .NET Ethernet applications.
 
I have sent Microchip a request to use the Copyrighted XC32 PIC32 legacy library header files (structs/enums) but never received a reply (http://www.microchip.com/...ight-usage-guidelines)
 
Microchip will probably allow me to use this "microchip_types.h" header file but I'd rather ask than assume.  Could someone please say whether this is allowed?  Using it will promote the use of Microchip's PIC32MX795 and Digilent's ProMX7.
 
Below is the header file microchip_types.h
 
/*******************************************************************************
CAN Library Interface Definition

Summary:
This file contains the Application Program Interface (API) definition for
the CAN peripheral library.

Description:
This library provides a low-level abstraction of the CAN (Controller Area
Network) module on Microchip PIC32MX family microcontrollers with a
convenient C language interface. It can be used to simplify low-level
access to the module without the necessity of interacting directly with the
module's registers, thus hiding differences from one microcontroller
variant to another.
*******************************************************************************/
//DOM-IGNORE-BEGIN
/*******************************************************************************
FileName: can.h
Processor: PIC32MX
Compiler: Microchip MPLAB C32 v1.06 or higher

Copyright © 2008-2009 released Microchip Technology Inc. All rights
reserved.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).

You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*******************************************************************************/
//DOM-IGNORE-END










/*******************************************************************************
UART Library Interface Definition

Summary:
This file contains the interface definition for the UART peripheral library.

Description:
This library provides a low-level abstraction of the UART (Universal
Asynchronous Receiver/Transmtter) module on Microchip PIC32MX family
microcontrollers with a convenient C language interface. It can be used to
simplify low-level access to the module without the necessity of interacting
directly with the module's registers, thus hiding differences from one
microcontroller variant to another.
*******************************************************************************/
//DOM-IGNORE-BEGIN
/*******************************************************************************
FileName: uart.h
Dependencies: See includes
Processor: PIC32MX

Compiler: Microchip MPLAB XC32 v1.00 or higher
Company: Microchip Technology Inc.

Copyright © 2008-2009 released Microchip Technology Inc. All rights
reserved.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).

You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*******************************************************************************

Author Date Description
-------------------------------------------------------------------------------
RP 12-Nov-2012 Cleaned up various code examples and comments.
*******************************************************************************/
//DOM-IGNORE-END





/**
* @file microchip_types.h
* @author Microchip
* @date 15 Oct 2017
*
* @brief Microchip types header file.
*
* This header is a combination of PIC32MX CAN and UART code.
*
* @see http://www.hadleyrobotics.com
*/





#ifndef MICROCHIP_TYPES_H
#define MICROCHIP_TYPES_H

#include <stdint.h>


////////////////////////////////////////////////////////
// The following is from Microchip's PIC32MX "CAN.h" //
////////////////////////////////////////////////////////


typedef enum {
 CAN_BIT_1TQ,
 CAN_BIT_2TQ,
 CAN_BIT_3TQ,
 CAN_BIT_4TQ,
 CAN_BIT_5TQ,
 CAN_BIT_6TQ,
 CAN_BIT_7TQ,
 CAN_BIT_8TQ
} CAN_BIT_TQ;

typedef struct
{
 // CAN TX Message Standard ID. This value should
 // be between 0x0 - 0x7FF.
 unsigned SID : 11;
 unsigned : 21;
} CAN_TX_MSG_SID;

typedef struct
{
 // Data Length Control. Specifies the size of the
 // data payload section of the CAN packet. Valid
 // values are 0x0 - 0x8.
 unsigned DLC : 4;

 // Reserved bit. Should be always 0.
 unsigned RB0 : 1;
 unsigned : 3;

 // Reserved bit. Should be always 0.
 unsigned RB1 : 1;

 // Remote Transmit Request bit. Should be set for
 // RTR messages, clear otherwise.
 unsigned RTR : 1;

 // CAN TX and RX Extended ID field. Valid values
 // are in range 0x0 - 0x3FFFF.
 unsigned EID : 18;

 // Identifier bit. If 0 means that message is SID.
 // If 1 means that message is EID type.
 unsigned IDE : 1;

 // Susbtitute Remote request bit. This bit should
 // always be clear for an EID message. It is ignored
 // for an SID message.
 unsigned SRR : 1;
 unsigned : 2;

} CAN_MSG_EID;

typedef union {

 struct
 {
  // This is SID portion of the CAN TX message.
  CAN_TX_MSG_SID msgSID;

  // This is EID portion of the CAN TX message.
  CAN_MSG_EID msgEID;

  // This is the data portion of the CAN TX message.
  unsigned char data[8];
 };

 // This is CAN TX message organized as a set of 32 bit
 // words.
 uint32_t messageWord[4];

} CANTxMessageBuffer;


// *****************************************************************************
/* CAN RX Message SID Word

Summary:
Defines the structure of the SID word section of the RX message.

Description:
This data structure represents the SID section of the CAN RX message. The data
data structure is an element of the CANRxMessageBuffer data structure.
*/

typedef struct
{
 // SID of the Received CAN Message.
 unsigned SID : 11;

 // Filter which accepted this message.
 unsigned FILHIT : 5;

 // Time stamp of the received message. This is
 // valid only if the Timestamping is enabled.
 unsigned CMSGTS : 16;

} CAN_RX_MSG_SID;


// *****************************************************************************
/* CAN RX Message Buffer

Summary:
Defines the structure of the CAN RX Message Buffer.

Description:
This data structure represents the CAN RX Message Buffer. Received messages could
be either full-receive messages or data-only messages. Full receive message contains
the message header and data payload section. For a full receive CAN RX channel, the
caller should use the msgSID, msgEID and data members . A data-only message contains
only a 8-byte data payload. While using this data structure with a Data-Only type of
CAN RX channel, the caller should use the dataOnlyMsgData member of the structure and
should read only 8 bytes of data.


*/

typedef union {

 struct
 {
  // This is SID portion of the CAN RX message.
  CAN_RX_MSG_SID msgSID;

  // This is EID portion of the CAN RX message
  CAN_MSG_EID msgEID;

  // This is the data payload section of the
  // received message.
  unsigned char data[8];
 };

 // This can be used if the message buffer is to
 // be read from a Data-Only type of CAN RX Channel.
 unsigned char dataOnlyMsgData[8];

 // This is CAN RX message organized as a set of 32 bit
 // words.
 uint32_t messageWord[4];

}CANRxMessageBuffer;


////////////////////////////////////////////////////////
// The following is from Microchip's PIC32MX "UART.h" //
////////////////////////////////////////////////////////

typedef enum
{
 // Enables high-speed range of the UART (see UARTSetBitRate).
 UART_ENABLE_HIGH_SPEED /*DOM-IGNORE-BEGIN*/ = 0x00000008/*DOM-IGNORE-END*/,

 // Inverts polarity of data interpretation the received (RX) pin.
 UART_INVERT_RECEIVE_POLARITY /*DOM-IGNORE-BEGIN*/ = 0x00000010/*DOM-IGNORE-END*/,

 // Enables UART TX-to-RX Loop-back mode.
 UART_ENABLE_LOOPBACK /*DOM-IGNORE-BEGIN*/ = 0x00000040/*DOM-IGNORE-END*/,

 // Enables Wake-up of the part when a start bit is received.
 UART_ENABLE_WAKE_ON_START /*DOM-IGNORE-BEGIN*/ = 0x00000080/*DOM-IGNORE-END*/,

 // Enable Bit-clock for external IrDA transceiver support (Note: CTS and RTS
 // cannot be used in bit-clock/IrDA mode).
 UART_ENABLE_PINS_BIT_CLOCK /*DOM-IGNORE-BEGIN*/ = 0x00000300/*DOM-IGNORE-END*/,

 // Enable Request-To-Send and Clear-To-Send signals (Note: The bit-clock
 // cannot be used in CTS/RTS mode).
 UART_ENABLE_PINS_CTS_RTS /*DOM-IGNORE-BEGIN*/ = 0x00000200/*DOM-IGNORE-END*/,

 // Enable Request-To-send signal only (Note: The bit-clock and CTS cannot
 // be used in RTS-Only mode).
 UART_ENABLE_PINS_RTS /*DOM-IGNORE-BEGIN*/ = 0x00000100/*DOM-IGNORE-END*/,

 // Disables use of Clear-To-Send and Request-To-Send signals (Note: This is
 // the default mode and this parameter can be left out if it is desired).
 UART_ENABLE_PINS_TX_RX_ONLY /*DOM-IGNORE-BEGIN*/ = 0x00000000/*DOM-IGNORE-END*/,

 // If RTS is enabled, it is asserted (driven low) when the receive buffer
 // is not full (i.e., the UART is ready to receive data). This is also known
 // as "RTS Flow-Control Mode".
 UART_RTS_WHEN_RX_NOT_FULL /*DOM-IGNORE-BEGIN*/ = 0x00000000/*DOM-IGNORE-END*/,

 // If RTS is enabled, it is asserted (driven low) when the transmit buffer
 // is not empty (i.e., when the UART has data ready to send). This is also
 // known as "RTS Simplex Mode".
 UART_RTS_WHEN_TX_NOT_EMPTY /*DOM-IGNORE-BEGIN*/ = 0x00000800/*DOM-IGNORE-END*/,

 // Enable the IrDA encoder/decoder.
 UART_ENABLE_IRDA /*DOM-IGNORE-BEGIN*/ = 0x00001000/*DOM-IGNORE-END*/,

 // Enables stopping of the UART operation to save power when the core has
 // been put in idle mode.
 UART_ENABLE_STOP_ON_IDLE /*DOM-IGNORE-BEGIN*/ = 0x00002000/*DOM-IGNORE-END*/,

 // Inverts the polarity of data sent on the transmit (TX) pin.
 UART_INVERT_TRANSMIT_POLARITY /*DOM-IGNORE-BEGIN*/ = 0x20000000/*DOM-IGNORE-END*/,

 // Enables support for IEEE-485 protocol (equivalent the following OR'd
 // together: UART_RTS_WHEN_TX_NOT_EMPTY | UART_ENABLE_PINS_RTS )
 // Note: The address must still be set using UARTEnableAddressDetect
 // to support IEEE-485 protocol.
 UART_SUPPORT_IEEE_485 /*DOM-IGNORE-BEGIN*/ = 0x00000900/*DOM-IGNORE-END*/

} UART_CONFIGURATION;

typedef enum
{
 // Sets the data transfer size to 8-bits per frame.
 UART_DATA_SIZE_8_BITS /*DOM-IGNORE-BEGIN*/ = 0x0000/*DOM-IGNORE-END*/,

 // Sets the data transfer size to 9-bits per frame.
 UART_DATA_SIZE_9_BITS /*DOM-IGNORE-BEGIN*/ = 0x0006/*DOM-IGNORE-END*/,

 // Enables parity bit generation for odd parity.
 UART_PARITY_ODD /*DOM-IGNORE-BEGIN*/ = 0x0004/*DOM-IGNORE-END*/,

 // Enables parity bit generation for even parity.
 UART_PARITY_EVEN /*DOM-IGNORE-BEGIN*/ = 0x0002/*DOM-IGNORE-END*/,

 // Disables parity bit generation.
 UART_PARITY_NONE /*DOM-IGNORE-BEGIN*/ = 0x0000/*DOM-IGNORE-END*/,

 // Enables generation of 2 stop bits per frame.
 UART_STOP_BITS_2 /*DOM-IGNORE-BEGIN*/ = 0x0001/*DOM-IGNORE-END*/,

 // Enables generation of 1 stop bit per frame (default).
 UART_STOP_BITS_1 /*DOM-IGNORE-BEGIN*/ = 0x0000/*DOM-IGNORE-END*/

} UART_LINE_CONTROL_MODE;


#endif

 
 
#1
du00000001
Just Some Member
  • Total Posts : 2024
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: online
Re: Using Microchip Copyrighted Struct/enums in PC library 2017/12/07 12:48:18 (permalink) ☼ Best Answerby hadleyrobotics 2017/12/10 13:44:43
0
Abstracting the general terms of use:
Provided it is used on Microchip products, it is legal to use the files/application code/etc.
In principle it would not be necessary to redistribute the file as the user has to use the Microchip tool chain, within which he would be able to get the file anyway.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#2
muellernick
Super Member
  • Total Posts : 425
  • Reward points : 0
  • Joined: 2015/01/06 23:58:23
  • Location: Germany
  • Status: offline
Re: Using Microchip Copyrighted Struct/enums in PC library 2017/12/18 05:21:20 (permalink)
0 (2)
WHAAAAAT!?
Microchip claims to have a copyright for that:
unsigned char data[8];

I'm sure I used such a wonderful name like "data" way before MCHP claimed copyright for it. And I know, I made it twice as good (using 16 bytes)
 
There is nothing in the header that can be copyrighted. Everyone who reads the CAN bus specs will come to the same or similar conclusion.
 
Nick
#3
du00000001
Just Some Member
  • Total Posts : 2024
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: online
Re: Using Microchip Copyrighted Struct/enums in PC library 2017/12/18 06:13:03 (permalink)
0
@ muellernick
You certainly had a clown for breakfast 😏

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#4
RISC
Super Member
  • Total Posts : 5240
  • Reward points : 0
  • Status: offline
Re: Using Microchip Copyrighted Struct/enums in PC library 2017/12/18 17:06:18 (permalink)
0
Hi,
You should try to post a ticket on the technical support : http://www.microchip.com/support
Regards
 
#5
LostInSpace
Super Member
  • Total Posts : 128
  • Reward points : 0
  • Joined: 2016/03/11 22:47:59
  • Location: 0
  • Status: offline
Re: Using Microchip Copyrighted Struct/enums in PC library 2017/12/22 13:56:41 (permalink)
0
Well, Microchip may have difficulty claiming that you violated their copyright if you just write,
 
unsigned char data[8];

But they can certainly claim a copyright on their comments.
 
 
I just usually take the safe route and re-write the header with my comments, then release it to the wild "where-is-as-is".
 
You never know what will happen in the future and who will buy whom. (and who will end up hating whom - i.e. Apple / Google / Qualcomm / Samsung, et. al.) These things come around, given enough time and it just gets weird. Then you have a mess cleaning up code.
 
HTH
 
#6
Jump to:
© 2018 APG vNext Commercial Version 4.5