---
linux.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/linux.c b/linux.c
index 4506b13..a52e254 100644
--- a/linux.c
+++ b/linux.c
@@ -69,18 +69,40 @@ int timed_getc(volatile uint8_t *c) {
return -ETIMEDOUT;
}
+const uint8_t hex[16]={'0','1','2','3','4','5','6','7',
+ '8','9','a','b','c','d','e','f'};
+
+void put_hex(uint8_t x)
+{
+ uart1_putc(hex[x >> 4]);
+ uart1_putc(hex[x & 15]);
+}
+
void main(void) {
volatile uint8_t sb[NUM_START_BYTES];
volatile uint32_t i;
volatile uint8_t cmd, parm1;
static volatile uint8_t state = IDLE_MODE;
volatile packet_t *p = 0;
+ uint8_t buf[IEEE802154_ADDR_LEN];
+ nvmType_t type = 0;
+ nvmErr_t err;
trim_xtal();
uart1_init(INC, MOD, SAMP);
maca_init();
maca_off();
+ vreg_init();
+ err = nvm_detect(gNvmInternalInterface_c, &type);
+ err = nvm_read(gNvmInternalInterface_c, type, buf, MAC_ADDR_NVM,
IEEE802154_ADDR_LEN);
+
+ uart1_putc(STATUS_SUCCESS);
+
+ for (i = 0; i < IEEE802154_ADDR_LEN; i++)
+ put_hex(buf[i]);
+ uart1_putc('\n');
+
while(1) {
/* clear out sb */
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Linux-zigbee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel