#include <stdio.h>#include <stdlib.h>#include <string.h>#include "mscbemb.h"#include "powerswitch.h"#include "Devices/adc_internal.h"Go to the source code of this file.
Defines | |
| #define | VREF 3.293f |
Functions | |
| void | user_write (unsigned char index) reentrant |
| float | read_voltage (unsigned char channel, float coeff, float offset) |
| void | publishErr () |
| void | PublishVariable (float xdata *pvarDest, float varSrce) |
| void | user_init (unsigned char init) |
| unsigned char | user_read (unsigned char index) |
| unsigned char | user_func (unsigned char *data_in, unsigned char *data_out) |
| void | user_loop (void) |
Variables | |
| char code | node_name [] = "PWRSWITCH" |
| char idata | svn_rev_code [] = "$Rev: 743 $" |
| unsigned char idata | _n_sub_addr = 1 |
| SYS_INFO | sys_info |
| unsigned char xdata | ADT7486A_addrArray [] = {0x48, 0x49, 0x4A} |
| MSCB_INFO_VAR code | vars [] |
| MSCB_INFO_VAR * | variables = vars |
| sbit | LED_RED = LED_0 |
| sbit | SST = MSCB_SST1 |
| sbit | ON6 = P0 ^ 0 |
| sbit | ON3 = P0 ^ 1 |
| sbit | ON4 = P0 ^ 2 |
| sbit | ON5 = P3 ^ 1 |
| sbit | ON1 = P0 ^ 6 |
| sbit | ON2 = P0 ^ 7 |
| sbit | SHDWN = P3 ^ 3 |
| unsigned char code | adc_index [] = {0xc, 0xd, 0x14, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb} |
| float code | coeff [] = {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00} |
| float code | offset [] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0} |
| #define VREF 3.293f |
Definition at line 67 of file powerswitch.c.
| void publishErr | ( | ) |
Definition at line 139 of file powerswitch.c.
| void PublishVariable | ( | float xdata * | pvarDest, | |
| float | varSrce | |||
| ) |
Definition at line 147 of file powerswitch.c.
| float read_voltage | ( | unsigned char | channel, | |
| float | coeff, | |||
| float | offset | |||
| ) |
Definition at line 260 of file powerswitch.c.
| unsigned char user_func | ( | unsigned char * | data_in, | |
| unsigned char * | data_out | |||
| ) |
Definition at line 250 of file powerswitch.c.
| void user_init | ( | unsigned char | init | ) |
Definition at line 155 of file powerswitch.c.
| void user_loop | ( | void | ) |
Definition at line 303 of file powerswitch.c.
| unsigned char user_read | ( | unsigned char | index | ) |
Definition at line 242 of file powerswitch.c.
| void user_write | ( | unsigned char | index | ) |
Definition at line 224 of file powerswitch.c.
| unsigned char idata _n_sub_addr = 1 |
Definition at line 61 of file powerswitch.c.
| unsigned char code adc_index[] = {0xc, 0xd, 0x14, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb} |
Definition at line 290 of file powerswitch.c.
| unsigned char xdata ADT7486A_addrArray[] = {0x48, 0x49, 0x4A} |
Definition at line 65 of file powerswitch.c.
| float code coeff[] = {2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 5.00, 5.00, 5.00, 5.00, 5.00, 5.00} |
Definition at line 291 of file powerswitch.c.
| sbit LED_RED = LED_0 |
Definition at line 121 of file powerswitch.c.
| char code node_name[] = "PWRSWITCH" |
Definition at line 57 of file powerswitch.c.
| float code offset[] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0} |
Definition at line 292 of file powerswitch.c.
| sbit ON1 = P0 ^ 6 |
Definition at line 128 of file powerswitch.c.
| sbit ON2 = P0 ^ 7 |
Definition at line 129 of file powerswitch.c.
| sbit ON3 = P0 ^ 1 |
Definition at line 125 of file powerswitch.c.
| sbit ON4 = P0 ^ 2 |
Definition at line 126 of file powerswitch.c.
| sbit ON5 = P3 ^ 1 |
Definition at line 127 of file powerswitch.c.
| sbit ON6 = P0 ^ 0 |
Definition at line 124 of file powerswitch.c.
| sbit SHDWN = P3 ^ 3 |
Definition at line 130 of file powerswitch.c.
| sbit SST = MSCB_SST1 |
Definition at line 122 of file powerswitch.c.
| char idata svn_rev_code[] = "$Rev: 743 $" |
Definition at line 58 of file powerswitch.c.
| SYS_INFO sys_info |
Definition at line 113 of file powerswitch.c.
| MSCB_INFO_VAR code vars[] |
Definition at line 69 of file powerswitch.c.
1.6.1