library/hd44780/hd44780ioClass/hd44780_NTCU165ECPB.h
int iosetBacklight(uint8_t dimvalue) 
{
	if(dimvalue)
	{
		// the dim value is 0-255 so devide by 32 to get a value 0-7
		devicewrite(CMD_SETBRIGHTNESS | (dimvalue/32));
		devicewrite(CMD_DISPLAYON);
	}
	else
	{
		devicewrite(CMD_DISPLAYOFF);
	}
	return(RV_ENOERR);
}
// iosetBacklight()  - set backlight brightness
// Since this display does not use a backlight but can control pixel intensity
// use the backlight brightness to set the pixel intensity.
//
// Note:
// The dimmer value on the CU165 is 3 bit value 
// other than the 000 value it looks like the value is mapped to a 4 bit
// value by adding a 0 msb.
// 000 is 1/16
// 001 is 2/16
// 010 is 4/16
// 011 is 6/16
// 100 is 8/16
// 101 is 10/16
// 110 is 12/16
// 111 is 14/16
//
// Becauswe of this, an API dimvalue of 0 does not turn off the display
// so the code must check for that and explicitly turn off the display if the
// API dimvalue is zero.
iosetBacklight()  - set backlight brightness
Since this display does not use a backlight but can control pixel intensity
use the backlight brightness to set the pixel intensity.

The dimmer value on the CU165 is 3 bit value
other than the 000 value it looks like the value is mapped to a 4 bit
value by adding a 0 msb.

Becauswe of this, an API dimvalue of 0 does not turn off the display
so the code must check for that and explicitly turn off the display if the
API dimvalue is zero.
iosetBacklight () - set backlight brightness Since this display does not use a backlight but can control pixel intensity use the backlight brightness to set the pixel intensity . The dimmer value on the CU165 is 3 bit value other than the 000 value it looks like the value is mapped to a 4 bit value by adding a 0 msb . Becauswe of this an API dimvalue of 0 does not turn off the display so the code must check for that and explicitly turn off the display if the API dimvalue is zero .
int iosetBacklight(uint8_t dimvalue) 
{
	if(dimvalue)
	{
		devicewrite(CMD_SETBRIGHTNESS | (dimvalue/32));
		devicewrite(CMD_DISPLAYON);
	}
	else
	{
		devicewrite(CMD_DISPLAYOFF);
	}
	return(RV_ENOERR);
}
int iosetBacklight ( uint8_t dimvalue ) { if ( dimvalue ) { devicewrite ( CMD_SETBRIGHTNESS | ( dimvalue / 32 ) ) ; devicewrite ( CMD_DISPLAYON ) ; } else { devicewrite ( CMD_DISPLAYOFF ) ; } return ( RV_ENOERR ) ; }
iosetBacklight()  - set backlight brightness
Since this display does not use a backlight but can control pixel intensity
use the backlight brightness to set the pixel intensity.
iosetBacklight () - set backlight brightness Since this display does not use a backlight but can control pixel intensity use the backlight brightness to set the pixel intensity .
// the dim value is 0-255 so devide by 32 to get a value 0-7