[En-Nut-Discussion] Bug in npluled.c ?

Douglas Pearless Douglas.Pearless at pearless.co.nz
Tue May 1 02:14:59 CEST 2007



   Hi,

   I think there is a bug in npluled.c

   /*!
 * \brief User LED status routine.
 *
 * \return The ULED Status (ULED_ON or ULED_OFF).
*
 */

   int NplUledStatus(void)
{
    int rc = (inb(NPL_XER) & NPL_MMCS) == NPL_USRLED;

    return rc;
}

   As this is looking at the MMC select line, it never correctly  
returns the LED status so should this actually be:

   /*!
 * \brief User LED status routine.
 *
 * \return The ULED Status (ULED_ON or ULED_OFF).
*
 */

   int NplUledStatus(void)
{
    int rc = (inb(NPL_XER) & NPL_USRLED) == NPL_USRLED; //Fixed by  
Douglas Pearless

    return rc;
}




More information about the En-Nut-Discussion mailing list