issp_extern.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* filename: ISSP_Extern.h */
  2. #include "issp_revision.h"
  3. #ifdef PROJECT_REV_304
  4. /*
  5. * Copyright 2006-2007, Cypress Semiconductor Corporation.
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  19. * MA 02110-1301, USA.
  20. */
  21. #ifndef INC_ISSP_EXTERN
  22. #define INC_ISSP_EXTERN
  23. #include "issp_directives.h"
  24. #include "issp_defs.h"
  25. extern signed char fXRESInitializeTargetForISSP(void);
  26. extern signed char fPowerCycleInitializeTargetForISSP(void);
  27. extern signed char fEraseTarget(void);
  28. extern unsigned int iLoadTarget(void);
  29. extern void ReStartTarget(void);
  30. extern signed char fVerifySiliconID(void);
  31. extern signed char fAccTargetBankChecksum(unsigned int *);
  32. extern void SetBankNumber(unsigned char);
  33. extern signed char fProgramTargetBlock(unsigned char, unsigned char);
  34. extern signed char fVerifyTargetBlock(unsigned char, unsigned char);
  35. /* PTJ: VERIFY-SETUP */
  36. extern signed char fVerifySetup(unsigned char, unsigned char);
  37. /* PTJ: read bytes after VERIFY-SETUP */
  38. extern signed char fReadByteLoop(void);
  39. extern signed char fSecureTargetFlash(void);
  40. extern signed char fReadStatus(void);/*PTJ:R-STATUS*/
  41. extern signed char fReadCalRegisters(void);
  42. extern signed char fReadWriteSetup(void);/*PTJ:RW-SETUP*/
  43. extern signed char fReadSecurity(void);/*PTJ: READ-SECURITY*/
  44. extern signed char fSyncDisable(void);/*PTJ: SYNC-DISABLE rev 307*/
  45. extern signed char fSyncEnable(void);/*PTJ: SYNC-ENABLE rev 307 */
  46. extern void InitTargetTestData(void);
  47. extern void LoadArrayWithSecurityData(unsigned char,
  48. unsigned char, unsigned char);
  49. extern void LoadProgramData(unsigned char, unsigned char);
  50. extern signed char fLoadSecurityData(unsigned char);
  51. extern void Delay(unsigned int);
  52. extern unsigned char fSDATACheck(void);
  53. extern void SCLKHigh(void);
  54. extern void SCLKLow(void);
  55. #ifndef RESET_MODE /*only needed when power cycle mode*/
  56. extern void SetSCLKHiZ(void);
  57. #endif
  58. extern void SetSCLKStrong(void);
  59. extern void SetSDATAHigh(void);
  60. extern void SetSDATALow(void);
  61. extern void SetSDATAHiZ(void);
  62. extern void SetSDATAOpenDrain(void);
  63. extern void SetSDATAStrong(void);
  64. extern void AssertXRES(void);
  65. extern void DeassertXRES(void);
  66. extern void SetXRESStrong(void);
  67. extern void ApplyTargetVDD(void);
  68. extern void RemoveTargetVDD(void);
  69. extern void SetTargetVDDStrong(void);
  70. #ifdef TX_ON
  71. extern void TX8SW_PutHexHalf(char ch);
  72. extern void TX8SW_PutHexByte(unsigned char ch);
  73. extern void TX8SW_PutHexWord(unsigned int ch);
  74. #endif
  75. extern unsigned char fIsError;
  76. /* Address Numbers for Bytes within a Block */
  77. extern unsigned char TargetDatabufLen;
  78. /* For example, radon is 2 */
  79. extern unsigned char NumBanks;
  80. /* Block Numbers for Program Data */
  81. extern unsigned char BlocksPerBank;
  82. extern unsigned char SecurityBytesPerBank;
  83. extern unsigned char bTargetDataPtr;
  84. extern unsigned char abTargetDataOUT[MAX_TARGET_DATABUFF_LEN];
  85. extern unsigned char TargetDatabufLen;
  86. extern unsigned int system_rev;
  87. #endif /* (INC_ISSP_EXTERN) */
  88. #endif /* (PROJECT_REV_) */
  89. /* end of file ISSP_Extern.h */