Added more functionality to the ATmega168 demo.

This commit is contained in:
skarg
2008-03-20 21:32:39 +00:00
parent 944cb46e51
commit a174b9bf59
11 changed files with 347 additions and 77 deletions
+8 -4
View File
@@ -39,11 +39,7 @@
/* demo objects */
#include "device.h"
#include "av.h"
#if 0
#include "ai.h"
#include "bi.h"
#include "bv.h"
#endif
/* Encodes the property APDU and returns the length,
or sets the error, and returns -1 */
@@ -73,6 +69,14 @@ int Encode_Property_APDU(
rp_data->array_index, error_class, error_code);
}
break;
case OBJECT_BINARY_VALUE:
if (Binary_Value_Valid_Instance(rp_data->object_instance)) {
apdu_len =
Binary_Value_Encode_Property_APDU(&apdu[0],
rp_data->object_instance, rp_data->object_property,
rp_data->array_index, error_class, error_code);
}
break;
default:
*error_class = ERROR_CLASS_OBJECT;
*error_code = ERROR_CODE_UNSUPPORTED_OBJECT_TYPE;