obj_spi_flash.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. /**
  2. ******************************************************************************
  3. * @file bsp_spi_flash.c
  4. * @author fire
  5. * @version V1.0
  6. * @date 2015-xx-xx
  7. * @brief spi flash 底层应用函数bsp
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * 实验平台:野火STM32 F103 开发板
  12. * 论坛 :http://www.firebbs.cn
  13. * 淘宝 :https://fire-stm32.taobao.com
  14. *
  15. ******************************************************************************
  16. */
  17. #include "obj_spi_flash.h"
  18. SPI_HandleTypeDef SpiHandle = {0};
  19. static __IO uint32_t SPITimeout = SPIT_LONG_TIMEOUT;
  20. static uint16_t SPI_TIMEOUT_UserCallback(uint8_t errorCode);
  21. /**
  22. * @brief SPI MSP Initialization
  23. * This function configures the hardware resources used in this example:
  24. * - Peripheral's clock enable
  25. * - Peripheral's GPIO Configuration
  26. * @param hspi: SPI handle pointer
  27. * @retval None
  28. */
  29. void HAL_SPI_MspInit_flash(SPI_HandleTypeDef *hspi)
  30. {
  31. GPIO_InitTypeDef GPIO_InitStruct;
  32. /*##-1- Enable peripherals and GPIO Clocks #################################*/
  33. /* Enable GPIO TX/RX clock */
  34. SPIx_SCK_GPIO_CLK_ENABLE();
  35. SPIx_MISO_GPIO_CLK_ENABLE();
  36. SPIx_MOSI_GPIO_CLK_ENABLE();
  37. SPIx_CS_GPIO_CLK_ENABLE();
  38. /* Enable SPI clock */
  39. SPIx_CLK_ENABLE();
  40. /*##-2- Configure peripheral GPIO ##########################################*/
  41. /* SPI SCK GPIO pin configuration */
  42. GPIO_InitStruct.Pin = SPIx_SCK_PIN;
  43. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  44. GPIO_InitStruct.Pull = GPIO_PULLUP;
  45. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  46. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  47. HAL_GPIO_Init(SPIx_SCK_GPIO_PORT, &GPIO_InitStruct);
  48. /* SPI MISO GPIO pin configuration */
  49. GPIO_InitStruct.Pin = SPIx_MISO_PIN;
  50. HAL_GPIO_Init(SPIx_MISO_GPIO_PORT, &GPIO_InitStruct);
  51. /* SPI MOSI GPIO pin configuration */
  52. GPIO_InitStruct.Pin = SPIx_MOSI_PIN;
  53. HAL_GPIO_Init(SPIx_MOSI_GPIO_PORT, &GPIO_InitStruct);
  54. GPIO_InitStruct.Pin = FLASH_CS_PIN ;
  55. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  56. HAL_GPIO_Init(FLASH_CS_GPIO_PORT, &GPIO_InitStruct);
  57. }
  58. void SPI_FLASH_Init(void)
  59. {
  60. SPI_HandleTypeDef * hspi = &SpiHandle;
  61. hspi->Instance = SPIx;
  62. hspi->Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128;
  63. hspi->Init.Direction = SPI_DIRECTION_2LINES;
  64. hspi->Init.CLKPhase = SPI_PHASE_2EDGE;
  65. hspi->Init.CLKPolarity = SPI_POLARITY_HIGH;
  66. hspi->Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  67. hspi->Init.CRCPolynomial = 7;
  68. hspi->Init.DataSize = SPI_DATASIZE_8BIT;
  69. hspi->Init.NSS = SPI_NSS_SOFT;
  70. hspi->Init.TIMode = SPI_TIMODE_DISABLE;
  71. hspi->Init.FirstBit = SPI_FIRSTBIT_MSB; //指定数据传输从MSB位还是LSB位开始:数据传输从MSB位开始
  72. hspi->Init.Mode = SPI_MODE_MASTER;
  73. HAL_SPI_Init(hspi);
  74. __HAL_SPI_ENABLE(hspi);
  75. SPI_FLASH_SendByte(Dummy_Byte);
  76. }
  77. /**
  78. * @brief 擦除FLASH扇区
  79. * @param SectorAddr:要擦除的扇区地址
  80. * @retval 无
  81. */
  82. void SPI_FLASH_SectorErase(uint32_t SectorAddr)
  83. {
  84. /* 发送FLASH写使能命令 */
  85. SPI_FLASH_WriteEnable();
  86. SPI_FLASH_WaitForWriteEnd();
  87. /* 擦除扇区 */
  88. /* 选择FLASH: CS低电平 */
  89. SPI_FLASH_CS_LOW();
  90. /* 发送扇区擦除指令*/
  91. SPI_FLASH_SendByte(W25X_SectorErase);
  92. /*发送擦除扇区地址的高位*/
  93. SPI_FLASH_SendByte((SectorAddr & 0xFF0000) >> 16);
  94. /* 发送擦除扇区地址的中位 */
  95. SPI_FLASH_SendByte((SectorAddr & 0xFF00) >> 8);
  96. /* 发送擦除扇区地址的低位 */
  97. SPI_FLASH_SendByte(SectorAddr & 0xFF);
  98. /* 停止信号 FLASH: CS 高电平 */
  99. SPI_FLASH_CS_HIGH();
  100. /* 等待擦除完毕*/
  101. SPI_FLASH_WaitForWriteEnd();
  102. }
  103. /**
  104. * @brief 擦除FLASH扇区,整片擦除
  105. * @param 无
  106. * @retval 无
  107. */
  108. void SPI_FLASH_BulkErase(void)
  109. {
  110. /* 发送FLASH写使能命令 */
  111. SPI_FLASH_WriteEnable();
  112. /* 整块 Erase */
  113. /* 选择FLASH: CS低电平 */
  114. SPI_FLASH_CS_LOW();
  115. /* 发送整块擦除指令*/
  116. SPI_FLASH_SendByte(W25X_ChipErase);
  117. /* 停止信号 FLASH: CS 高电平 */
  118. SPI_FLASH_CS_HIGH();
  119. /* 等待擦除完毕*/
  120. SPI_FLASH_WaitForWriteEnd();
  121. }
  122. /**
  123. * @brief 对FLASH按页写入数据,调用本函数写入数据前需要先擦除扇区
  124. * @param pBuffer,要写入数据的指针
  125. * @param WriteAddr,写入地址
  126. * @param NumByteToWrite,写入数据长度,必须小于等于SPI_FLASH_PerWritePageSize
  127. * @retval 无
  128. */
  129. void SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite)
  130. {
  131. /* 发送FLASH写使能命令 */
  132. SPI_FLASH_WriteEnable();
  133. /* 选择FLASH: CS低电平 */
  134. SPI_FLASH_CS_LOW();
  135. /* 写页写指令*/
  136. SPI_FLASH_SendByte(W25X_PageProgram);
  137. /*发送写地址的高位*/
  138. SPI_FLASH_SendByte((WriteAddr & 0xFF0000) >> 16);
  139. /*发送写地址的中位*/
  140. SPI_FLASH_SendByte((WriteAddr & 0xFF00) >> 8);
  141. /*发送写地址的低位*/
  142. SPI_FLASH_SendByte(WriteAddr & 0xFF);
  143. if(NumByteToWrite > SPI_FLASH_PerWritePageSize)
  144. {
  145. NumByteToWrite = SPI_FLASH_PerWritePageSize;
  146. FLASH_ERROR("SPI_FLASH_PageWrite too large!");
  147. }
  148. /* 写入数据*/
  149. while (NumByteToWrite--)
  150. {
  151. /* 发送当前要写入的字节数据 */
  152. SPI_FLASH_SendByte(*pBuffer);
  153. /* 指向下一字节数据 */
  154. pBuffer++;
  155. }
  156. /* 停止信号 FLASH: CS 高电平 */
  157. SPI_FLASH_CS_HIGH();
  158. /* 等待写入完毕*/
  159. SPI_FLASH_WaitForWriteEnd();
  160. }
  161. /**
  162. * @brief 对FLASH写入数据,调用本函数写入数据前需要先擦除扇区
  163. * @param pBuffer,要写入数据的指针
  164. * @param WriteAddr,写入地址
  165. * @param NumByteToWrite,写入数据长度
  166. * @retval 无
  167. */
  168. void SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite)
  169. {
  170. uint8_t NumOfPage = 0, NumOfSingle = 0, Addr = 0, count = 0, temp = 0;
  171. /*mod运算求余,若writeAddr是SPI_FLASH_PageSize整数倍,运算结果Addr值为0*/
  172. Addr = WriteAddr % SPI_FLASH_PageSize;
  173. /*差count个数据值,刚好可以对齐到页地址*/
  174. count = SPI_FLASH_PageSize - Addr;
  175. /*计算出要写多少整数页*/
  176. NumOfPage = NumByteToWrite / SPI_FLASH_PageSize;
  177. /*mod运算求余,计算出剩余不满一页的字节数*/
  178. NumOfSingle = NumByteToWrite % SPI_FLASH_PageSize;
  179. /* Addr=0,则WriteAddr 刚好按页对齐 aligned */
  180. if (Addr == 0)
  181. {
  182. /* NumByteToWrite < SPI_FLASH_PageSize */
  183. if (NumOfPage == 0)
  184. {
  185. SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumByteToWrite);
  186. }
  187. else /* NumByteToWrite > SPI_FLASH_PageSize */
  188. {
  189. /*先把整数页都写了*/
  190. while (NumOfPage--)
  191. {
  192. SPI_FLASH_PageWrite(pBuffer, WriteAddr, SPI_FLASH_PageSize);
  193. WriteAddr += SPI_FLASH_PageSize;
  194. pBuffer += SPI_FLASH_PageSize;
  195. }
  196. /*若有多余的不满一页的数据,把它写完*/
  197. SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumOfSingle);
  198. }
  199. }
  200. /* 若地址与 SPI_FLASH_PageSize 不对齐 */
  201. else
  202. {
  203. /* NumByteToWrite < SPI_FLASH_PageSize */
  204. if (NumOfPage == 0)
  205. {
  206. /*当前页剩余的count个位置比NumOfSingle小,写不完*/
  207. if (NumOfSingle > count)
  208. {
  209. temp = NumOfSingle - count;
  210. /*先写满当前页*/
  211. SPI_FLASH_PageWrite(pBuffer, WriteAddr, count);
  212. WriteAddr += count;
  213. pBuffer += count;
  214. /*再写剩余的数据*/
  215. SPI_FLASH_PageWrite(pBuffer, WriteAddr, temp);
  216. }
  217. else /*当前页剩余的count个位置能写完NumOfSingle个数据*/
  218. {
  219. SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumByteToWrite);
  220. }
  221. }
  222. else /* NumByteToWrite > SPI_FLASH_PageSize */
  223. {
  224. /*地址不对齐多出的count分开处理,不加入这个运算*/
  225. NumByteToWrite -= count;
  226. NumOfPage = NumByteToWrite / SPI_FLASH_PageSize;
  227. NumOfSingle = NumByteToWrite % SPI_FLASH_PageSize;
  228. SPI_FLASH_PageWrite(pBuffer, WriteAddr, count);
  229. WriteAddr += count;
  230. pBuffer += count;
  231. /*把整数页都写了*/
  232. while (NumOfPage--)
  233. {
  234. SPI_FLASH_PageWrite(pBuffer, WriteAddr, SPI_FLASH_PageSize);
  235. WriteAddr += SPI_FLASH_PageSize;
  236. pBuffer += SPI_FLASH_PageSize;
  237. }
  238. /*若有多余的不满一页的数据,把它写完*/
  239. if (NumOfSingle != 0)
  240. {
  241. SPI_FLASH_PageWrite(pBuffer, WriteAddr, NumOfSingle);
  242. }
  243. }
  244. }
  245. }
  246. /**
  247. * @brief 读取FLASH数据
  248. * @param pBuffer,存储读出数据的指针
  249. * @param ReadAddr,读取地址
  250. * @param NumByteToRead,读取数据长度
  251. * @retval 无
  252. */
  253. void SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead)
  254. {
  255. /* 选择FLASH: CS低电平 */
  256. SPI_FLASH_CS_LOW();
  257. /* 发送 读 指令 */
  258. SPI_FLASH_SendByte(W25X_ReadData);
  259. /* 发送 读 地址高位 */
  260. SPI_FLASH_SendByte((ReadAddr & 0xFF0000) >> 16);
  261. /* 发送 读 地址中位 */
  262. SPI_FLASH_SendByte((ReadAddr& 0xFF00) >> 8);
  263. /* 发送 读 地址低位 */
  264. SPI_FLASH_SendByte(ReadAddr & 0xFF);
  265. /* 读取数据 */
  266. while (NumByteToRead--)
  267. {
  268. /* 读取一个字节*/
  269. *pBuffer = SPI_FLASH_SendByte(Dummy_Byte);
  270. /* 指向下一个字节缓冲区 */
  271. pBuffer++;
  272. }
  273. /* 停止信号 FLASH: CS 高电平 */
  274. SPI_FLASH_CS_HIGH();
  275. }
  276. /**
  277. * @brief 读取FLASH ID
  278. * @param 无
  279. * @retval FLASH ID
  280. */
  281. uint32_t SPI_FLASH_ReadID(void)
  282. {
  283. uint32_t Temp = 0;
  284. uint8_t Temp0 = 0, Temp1 = 0, Temp2 = 0;
  285. /* 开始通讯:CS低电平 */
  286. SPI_FLASH_CS_LOW();
  287. /* 发送JEDEC指令,读取ID */
  288. SPI_FLASH_SendByte(W25X_JedecDeviceID);
  289. /* 读取一个字节数据 */
  290. Temp0 = SPI_FLASH_SendByte(Dummy_Byte);
  291. /* 读取一个字节数据 */
  292. Temp1 = SPI_FLASH_SendByte(Dummy_Byte);
  293. /* 读取一个字节数据 */
  294. Temp2 = SPI_FLASH_SendByte(Dummy_Byte);
  295. /* 停止通讯:CS高电平 */
  296. SPI_FLASH_CS_HIGH();
  297. /*把数据组合起来,作为函数的返回值*/
  298. Temp = ((uint32_t)Temp0 << 16) | ((uint32_t)Temp1 << 8) | (uint32_t)Temp2;
  299. return Temp;
  300. }
  301. /**
  302. * @brief 读取FLASH Device ID
  303. * @param 无
  304. * @retval FLASH Device ID
  305. */
  306. uint32_t SPI_FLASH_ReadDeviceID(void)
  307. {
  308. uint32_t Temp = 0;
  309. /* Select the FLASH: Chip Select low */
  310. SPI_FLASH_CS_LOW();
  311. /* Send "RDID " instruction */
  312. SPI_FLASH_SendByte(W25X_DeviceID);
  313. SPI_FLASH_SendByte(Dummy_Byte);
  314. SPI_FLASH_SendByte(Dummy_Byte);
  315. SPI_FLASH_SendByte(Dummy_Byte);
  316. /* Read a byte from the FLASH */
  317. Temp = SPI_FLASH_SendByte(Dummy_Byte);
  318. /* Deselect the FLASH: Chip Select high */
  319. SPI_FLASH_CS_HIGH();
  320. return Temp;
  321. }
  322. /*******************************************************************************
  323. * Function Name : SPI_FLASH_StartReadSequence
  324. * Description : Initiates a read data byte (READ) sequence from the Flash.
  325. * This is done by driving the /CS line low to select the device,
  326. * then the READ instruction is transmitted followed by 3 bytes
  327. * address. This function exit and keep the /CS line low, so the
  328. * Flash still being selected. With this technique the whole
  329. * content of the Flash is read with a single READ instruction.
  330. * Input : - ReadAddr : FLASH's internal address to read from.
  331. * Output : None
  332. * Return : None
  333. *******************************************************************************/
  334. void SPI_FLASH_StartReadSequence(uint32_t ReadAddr)
  335. {
  336. /* Select the FLASH: Chip Select low */
  337. SPI_FLASH_CS_LOW();
  338. /* Send "Read from Memory " instruction */
  339. SPI_FLASH_SendByte(W25X_ReadData);
  340. /* Send the 24-bit address of the address to read from -----------------------*/
  341. /* Send ReadAddr high nibble address byte */
  342. SPI_FLASH_SendByte((ReadAddr & 0xFF0000) >> 16);
  343. /* Send ReadAddr medium nibble address byte */
  344. SPI_FLASH_SendByte((ReadAddr& 0xFF00) >> 8);
  345. /* Send ReadAddr low nibble address byte */
  346. SPI_FLASH_SendByte(ReadAddr & 0xFF);
  347. }
  348. /**
  349. * @brief 使用SPI读取一个字节的数据
  350. * @param 无
  351. * @retval 返回接收到的数据
  352. */
  353. uint8_t SPI_FLASH_ReadByte(void)
  354. {
  355. return (SPI_FLASH_SendByte(Dummy_Byte));
  356. }
  357. /**
  358. * @brief 使用SPI发送一个字节的数据
  359. * @param byte:要发送的数据
  360. * @retval 返回接收到的数据
  361. */
  362. uint8_t SPI_FLASH_SendByte(uint8_t byte)
  363. {
  364. SPITimeout = SPIT_FLAG_TIMEOUT;
  365. /* 等待发送缓冲区为空,TXE事件 */
  366. while (__HAL_SPI_GET_FLAG( &SpiHandle, SPI_FLAG_TXE ) == RESET)
  367. {
  368. if((SPITimeout--) == 0) return SPI_TIMEOUT_UserCallback(0);
  369. }
  370. /* 写入数据寄存器,把要写入的数据写入发送缓冲区 */
  371. WRITE_REG(SpiHandle.Instance->DR, byte);
  372. SPITimeout = SPIT_FLAG_TIMEOUT;
  373. /* 等待接收缓冲区非空,RXNE事件 */
  374. while (__HAL_SPI_GET_FLAG( &SpiHandle, SPI_FLAG_RXNE ) == RESET)
  375. {
  376. if((SPITimeout--) == 0) return SPI_TIMEOUT_UserCallback(1);
  377. }
  378. /* 读取数据寄存器,获取接收缓冲区数据 */
  379. return READ_REG(SpiHandle.Instance->DR);
  380. }
  381. /*******************************************************************************
  382. * Function Name : SPI_FLASH_SendHalfWord
  383. * Description : Sends a Half Word through the SPI interface and return the
  384. * Half Word received from the SPI bus.
  385. * Input : Half Word : Half Word to send.
  386. * Output : None
  387. * Return : The value of the received Half Word.
  388. *******************************************************************************/
  389. uint16_t SPI_FLASH_SendHalfWord(uint16_t HalfWord)
  390. {
  391. SPITimeout = SPIT_FLAG_TIMEOUT;
  392. /* Loop while DR register in not emplty */
  393. while (__HAL_SPI_GET_FLAG( &SpiHandle, SPI_FLAG_TXE ) == RESET)
  394. {
  395. if((SPITimeout--) == 0) return SPI_TIMEOUT_UserCallback(2);
  396. }
  397. /* Send Half Word through the SPIx peripheral */
  398. WRITE_REG(SpiHandle.Instance->DR, HalfWord);
  399. SPITimeout = SPIT_FLAG_TIMEOUT;
  400. /* Wait to receive a Half Word */
  401. while (__HAL_SPI_GET_FLAG( &SpiHandle, SPI_FLAG_RXNE ) == RESET)
  402. {
  403. if((SPITimeout--) == 0) return SPI_TIMEOUT_UserCallback(3);
  404. }
  405. /* Return the Half Word read from the SPI bus */
  406. return READ_REG(SpiHandle.Instance->DR);
  407. }
  408. /**
  409. * @brief 向FLASH发送 写使能 命令
  410. * @param none
  411. * @retval none
  412. */
  413. void SPI_FLASH_WriteEnable(void)
  414. {
  415. /* 通讯开始:CS低 */
  416. SPI_FLASH_CS_LOW();
  417. /* 发送写使能命令*/
  418. SPI_FLASH_SendByte(W25X_WriteEnable);
  419. /*通讯结束:CS高 */
  420. SPI_FLASH_CS_HIGH();
  421. }
  422. /**
  423. * @brief 等待WIP(BUSY)标志被置0,即等待到FLASH内部数据写入完毕
  424. * @param none
  425. * @retval none
  426. */
  427. void SPI_FLASH_WaitForWriteEnd(void)
  428. {
  429. uint8_t FLASH_Status = 0;
  430. /* 选择 FLASH: CS 低 */
  431. SPI_FLASH_CS_LOW();
  432. /* 发送 读状态寄存器 命令 */
  433. SPI_FLASH_SendByte(W25X_ReadStatusReg);
  434. SPITimeout = SPIT_FLAG_TIMEOUT;
  435. /* 若FLASH忙碌,则等待 */
  436. do
  437. {
  438. /* 读取FLASH芯片的状态寄存器 */
  439. FLASH_Status = SPI_FLASH_SendByte(Dummy_Byte);
  440. {
  441. if((SPITimeout--) == 0)
  442. {
  443. SPI_TIMEOUT_UserCallback(4);
  444. return;
  445. }
  446. }
  447. }
  448. while ((FLASH_Status & WIP_Flag) == SET); /* 正在写入标志 */
  449. /* 停止信号 FLASH: CS 高 */
  450. SPI_FLASH_CS_HIGH();
  451. }
  452. //进入掉电模式
  453. void SPI_Flash_PowerDown(void)
  454. {
  455. /* 选择 FLASH: CS 低 */
  456. SPI_FLASH_CS_LOW();
  457. /* 发送 掉电 命令 */
  458. SPI_FLASH_SendByte(W25X_PowerDown);
  459. /* 停止信号 FLASH: CS 高 */
  460. SPI_FLASH_CS_HIGH();
  461. }
  462. //唤醒
  463. void SPI_Flash_WAKEUP(void)
  464. {
  465. /*选择 FLASH: CS 低 */
  466. SPI_FLASH_CS_LOW();
  467. /* 发上 上电 命令 */
  468. SPI_FLASH_SendByte(W25X_ReleasePowerDown);
  469. /* 停止信号 FLASH: CS 高 */
  470. SPI_FLASH_CS_HIGH(); //等待TRES1
  471. }
  472. /**
  473. * @brief 等待超时回调函数
  474. * @param None.
  475. * @retval None.
  476. */
  477. static uint16_t SPI_TIMEOUT_UserCallback(uint8_t errorCode)
  478. {
  479. /* 等待超时后的处理,输出错误信息 */
  480. FLASH_ERROR("SPI 等待超时!errorCode = %d",errorCode);
  481. return 0;
  482. }
  483. /*********************************************END OF FILE**********************/