Added more objects to BDK port, and connected AI to ADC7, and BI0..BI4 to PINB0..PINB4. Fixed up some other objects and object API (header files).

This commit is contained in:
skarg
2009-06-18 03:58:54 +00:00
parent 6e6cdf2bc0
commit e70dd3c7ba
18 changed files with 814 additions and 29 deletions
+11 -2
View File
@@ -39,7 +39,7 @@
#error Modify the Analog_Input_Name to handle multiple digits
#endif
static uint8_t Present_Value[MAX_ANALOG_INPUTS];
static float Present_Value[MAX_ANALOG_INPUTS];
/* we simply have 0-n object instances. Yours might be */
/* more complex, and then you need validate that the */
@@ -80,7 +80,7 @@ char *Analog_Input_Name(
return NULL;
}
static float Analog_Input_Present_Value(
float Analog_Input_Present_Value(
uint32_t object_instance)
{
float value = 0.0;
@@ -91,6 +91,15 @@ static float Analog_Input_Present_Value(
return value;
}
void Analog_Input_Present_Value_Set(
uint32_t object_instance,
float value)
{
if (object_instance < MAX_ANALOG_INPUTS) {
Present_Value[object_instance] = value;
}
}
/* return apdu length, or -1 on error */
/* assumption - object has already exists */
int Analog_Input_Encode_Property_APDU(