Mercurial > flash_v2
comparison packages/hal/common/current/include/hal_if.h @ 1457:9bf998a57d30
Handle changes in FLASH CFG API
| author | gthomas |
|---|---|
| date | Mon, 05 Jan 2004 21:58:16 +0000 |
| parents | c15fe26f81c7 |
| children |
comparison
equal
deleted
inserted
replaced
| 1456:17c50425fc72 | 1457:9bf998a57d30 |
|---|---|
| 10 //============================================================================= | 10 //============================================================================= |
| 11 //####ECOSGPLCOPYRIGHTBEGIN#### | 11 //####ECOSGPLCOPYRIGHTBEGIN#### |
| 12 // ------------------------------------------- | 12 // ------------------------------------------- |
| 13 // This file is part of eCos, the Embedded Configurable Operating System. | 13 // This file is part of eCos, the Embedded Configurable Operating System. |
| 14 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. | 14 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. |
| 15 // Copyright (C) 2002, 2003 Gary Thomas | 15 // Copyright (C) 2002, 2003, 2004 Gary Thomas |
| 16 // | 16 // |
| 17 // eCos is free software; you can redistribute it and/or modify it under | 17 // eCos is free software; you can redistribute it and/or modify it under |
| 18 // the terms of the GNU General Public License as published by the Free | 18 // the terms of the GNU General Public License as published by the Free |
| 19 // Software Foundation; either version 2 or (at your option) any later version. | 19 // Software Foundation; either version 2 or (at your option) any later version. |
| 20 // | 20 // |
| 650 // Access persistent data store - kept in FLASH or EEPROM by RedBoot | 650 // Access persistent data store - kept in FLASH or EEPROM by RedBoot |
| 651 // | 651 // |
| 652 #define CYGNUM_CALL_IF_FLASH_CFG_GET (0) // Get a particular fconfig key | 652 #define CYGNUM_CALL_IF_FLASH_CFG_GET (0) // Get a particular fconfig key |
| 653 #define CYGNUM_CALL_IF_FLASH_CFG_NEXT (1) // Enumerate keys (get the next one) | 653 #define CYGNUM_CALL_IF_FLASH_CFG_NEXT (1) // Enumerate keys (get the next one) |
| 654 #define CYGNUM_CALL_IF_FLASH_CFG_SET (2) // Update particular fconfig key | 654 #define CYGNUM_CALL_IF_FLASH_CFG_SET (2) // Update particular fconfig key |
| 655 #define CYGACC_CALL_IF_FLASH_CFG_OP(_o_,_d_) \ | 655 #define CYGACC_CALL_IF_FLASH_CFG_OP2(_o_,_d_) \ |
| 656 CYGACC_CALL_VV2(__call_if_flash_cfg_op_fn_t*, CYGNUM_CALL_IF_FLASH_CFG_OP, (_o_),(_d_)) | 656 CYGACC_CALL_VV2(__call_if_flash_cfg_op_fn_t*, CYGNUM_CALL_IF_FLASH_CFG_OP, (_o_),(_d_)) |
| 657 __call_VV2(CYGNUM_CALL_IF_FLASH_CFG_OP, __call_if_flash_cfg_op_fn_t, cyg_bool, int, struct cyg_fconfig *) | 657 __call_VV2(CYGNUM_CALL_IF_FLASH_CFG_OP, __call_if_flash_cfg_op_fn_t, cyg_bool, int, struct cyg_fconfig *) |
| 658 | |
| 659 static __inline__ cyg_bool | |
| 660 __call_if_flash_cfg_op(int op, char *key, void *data, int type) | |
| 661 { | |
| 662 struct cyg_fconfig info; | |
| 663 info.key = key; | |
| 664 info.val = data; | |
| 665 info.type = type; | |
| 666 info.offset = 0; | |
| 667 return CYGACC_CALL_IF_FLASH_CFG_OP2(op, &info); | |
| 668 } | |
| 669 #define CYGACC_CALL_IF_FLASH_CFG_OP(_o_,_k_,_d_,_t_) \ | |
| 670 __call_if_flash_cfg_op(_o_,_k_,_d_,_t_) | |
| 658 #define CYGACC_CALL_IF_FLASH_CFG_OP_SET(_x_) \ | 671 #define CYGACC_CALL_IF_FLASH_CFG_OP_SET(_x_) \ |
| 659 hal_virtual_vector_table[CYGNUM_CALL_IF_FLASH_CFG_OP]=(CYG_ADDRWORD)(_x_) | 672 hal_virtual_vector_table[CYGNUM_CALL_IF_FLASH_CFG_OP]=(CYG_ADDRWORD)(_x_) |
| 660 | 673 |
| 661 #define CYGACC_CALL_IF_MONITOR_RETURN(_u_) \ | 674 #define CYGACC_CALL_IF_MONITOR_RETURN(_u_) \ |
| 662 CYGACC_CALL_VV1(__call_if_monitor_return_t*, CYGNUM_CALL_IF_MONITOR_RETURN, (_u_)) | 675 CYGACC_CALL_VV1(__call_if_monitor_return_t*, CYGNUM_CALL_IF_MONITOR_RETURN, (_u_)) |
