ARMEBS4  revision-26.06.2015
lightness_to_pwm.h File Reference

Handle non-linearity in human eye brightness sensitivity. More...

#include <stdint.h>
#include "heivs/error.h"
Include dependency graph for lightness_to_pwm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define LIGHTNESS_PWM_STEP
 Number a step for a pwm using lightness_to_pwm.
 
uint8_t lightness_to_pwm (uint8_t percentage)
 PWM value for driving a LED expressed as perceived percentage. More...
 

Detailed Description

Handle non-linearity in human eye brightness sensitivity.

Author
marc dot pignat at hevs dot ch

Definition in file lightness_to_pwm.h.

Function Documentation

uint8_t lightness_to_pwm ( uint8_t  percentage)

PWM value for driving a LED expressed as perceived percentage.

Parameters
percentageexpected of luminosity (0..100)
Returns
the value to be put in a 0..LIGHTNESS_PWM_STEP pwm

Definition at line 39 of file lightness_to_pwm.c.

References ARRAY_SIZE.