Project

General

Profile

Revision 87a830c5

ID87a830c59f978b8cf0423c76f6a0d8f87b8075f3
Parent d838fe06
Child 87c22974

Added by RicardoSilva91 almost 7 years ago

main tests

View differences:

tpf/power.c
1 1
#include "power.h"
2
#include "display.h"
2 3

  
4
#define antigo
5

  
6
// Power Settings
7
static uint16_t powerSettings[] = {150, 350, 500, 750};
8
static uint8_t powerSettingsIndex=0;
9

  
10

  
11
uint8_t nextPowerSetting()
12
{
13
    powerSettingsIndex++;
14
    if(powerSettingsIndex>3)
15
    {
16
        powerSettingsIndex=0;
17
    }
18
    
19
    setDisplayPower(powerSettings[powerSettingsIndex]);
20
    
21
    return 0;
22
}
23

  
24
uint8_t previousPowerSetting()
25
{
26
    if(powerSettingsIndex == 0)
27
    {
28
        powerSettingsIndex=3;
29
    }
30
    else
31
    {
32
        powerSettingsIndex--;
33
    }
34
    
35
    setDisplayPower(powerSettings[powerSettingsIndex]);
36
    
37
    return 0;
38
}
39

  
40

  
41
#ifndef antigo
3 42
uint8_t setPower(uint8_t powerValue, time_t execTime)
4 43
{
5 44
    return 0;
......
9 48
{
10 49
    return 0;
11 50
}
51

  
52
#endif 

Also available in: Unified diff