[bug #54615] file iox256d3.h - ADC_CH_MUXNEG_PINx_gc wrong.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[bug #54615] file iox256d3.h - ADC_CH_MUXNEG_PINx_gc wrong.

Joerg Wunsch-6
URL:
  <http://savannah.nongnu.org/bugs/?54615>

                 Summary: file iox256d3.h - ADC_CH_MUXNEG_PINx_gc wrong.
                 Project: AVR C Runtime Library
            Submitted by: None
            Submitted on: Mon 03 Sep 2018 07:48:05 PM UTC
                Category: Header
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Header files
                  Status: None
        Percent Complete: 0%
             Assigned to: None
        Originator Email: [hidden email]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 2.0.0
           Fixed Release: None

    _______________________________________________________

Details:

This is from the iox256d3.h file

/* Negative input multiplexer selection */
typedef enum ADC_CH_MUXNEG_enum
{
    ADC_CH_MUXNEG_PIN0_gc = (0x00<<0),  /* Input pin 0 */
    ADC_CH_MUXNEG_PIN1_gc = (0x01<<0),  /* Input pin 1 */
    ADC_CH_MUXNEG_PIN2_gc = (0x02<<0),  /* Input pin 2 */
    ADC_CH_MUXNEG_PIN3_gc = (0x03<<0),  /* Input pin 3 */
    ADC_CH_MUXNEG_PIN4_gc = (0x04<<0),  /* Input pin 4 */
    ADC_CH_MUXNEG_PIN5_gc = (0x05<<0),  /* Input pin 5 */
    ADC_CH_MUXNEG_PIN6_gc = (0x06<<0),  /* Input pin 6 */
    ADC_CH_MUXNEG_PIN7_gc = (0x07<<0),  /* Input pin 7 */
} ADC_CH_MUXNEG_t;

pins 4 to 7 are incorrect with the datasheet for the device.

File iox256c3.h has the correct values. Shown below.

/* Negative input multiplexer selection */
typedef enum ADC_CH_MUXNEG_enum
{
    ADC_CH_MUXNEG_PIN0_gc = (0x00<<0),  /* Input pin 0 */
    ADC_CH_MUXNEG_PIN1_gc = (0x01<<0),  /* Input pin 1 */
    ADC_CH_MUXNEG_PIN2_gc = (0x02<<0),  /* Input pin 2 */
    ADC_CH_MUXNEG_PIN3_gc = (0x03<<0),  /* Input pin 3 */
    ADC_CH_MUXNEG_PIN4_gc = (0x00<<0),  /* Input pin 4 */
    ADC_CH_MUXNEG_PIN5_gc = (0x01<<0),  /* Input pin 5 */
    ADC_CH_MUXNEG_PIN6_gc = (0x02<<0),  /* Input pin 6 */
    ADC_CH_MUXNEG_PIN7_gc = (0x03<<0),  /* Input pin 7 */
} ADC_CH_MUXNEG_t;






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?54615>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev