sx12xxEiger.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * THE FOLLOWING FIRMWARE IS PROVIDED: (1) "AS IS" WITH NO WARRANTY; AND
  3. * (2)TO ENABLE ACCESS TO CODING INFORMATION TO GUIDE AND FACILITATE CUSTOMER.
  4. * CONSEQUENTLY, SEMTECH SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR
  5. * CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
  6. * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
  7. * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  8. *
  9. * Copyright (C) SEMTECH S.A.
  10. */
  11. /*!
  12. * \file sx12xxEiger.c
  13. * \brief
  14. *
  15. * \version 1.0
  16. * \date Nov 21 2012
  17. * \author Miguel Luis
  18. */
  19. #include <stdint.h>
  20. #include "sx12xxEiger.h"
  21. //#if( defined( STM32F4XX ) || defined( STM32F2XX ) || defined( STM32F429_439xx ) )
  22. //
  23. //#include "usbd_cdc_core.h"
  24. //#include "usbd_usr.h"
  25. //#include "usbd_desc.h"
  26. //
  27. //#else
  28. //
  29. //#include "usb_regs.h"
  30. //#include "usb_core.h"
  31. //#include "usb_init.h"
  32. //#include "usb_pwr.h"
  33. //#include "usb_bsp.h"
  34. //#include "usb_sil.h"
  35. //#endif
  36. // System tick (1ms)
  37. volatile uint32_t TickCounter = 0;
  38. #if( defined( STM32F4XX ) || defined( STM32F2XX ) || defined( STM32F429_439xx ) )
  39. #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED
  40. #if defined ( __ICCARM__ ) /*!< IAR Compiler */
  41. #pragma data_alignment=4
  42. #endif
  43. #endif /* USB_OTG_HS_INTERNAL_DMA_ENABLED */
  44. __ALIGN_BEGIN USB_OTG_CORE_HANDLE USB_OTG_dev __ALIGN_END ;
  45. #else
  46. #endif
  47. void BoardInit( void )
  48. {
  49. // CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);//16Mhz
  50. // /* Setup SysTick Timer for 1 ms interrupts ( not too often to save power ) */
  51. // Tick_Configration();
  52. //
  53. // RCC_Configuration();
  54. // IOinitial_Configration();
  55. // SX1278_SPI_Tim_Configration();
  56. }
  57. //void Delay ( uint32_t delay )
  58. //{
  59. // // Wait delay ms
  60. // uint32_t startTick = TickCounter;
  61. // while( ( TickCounter - startTick ) < delay );
  62. //}
  63. //
  64. //void LongDelay ( uint8_t delay )
  65. //{
  66. // uint32_t longDelay;
  67. // uint32_t startTick;
  68. //
  69. // longDelay = delay * 1000;
  70. //
  71. // // Wait delay s
  72. // startTick = TickCounter;
  73. // while( ( TickCounter - startTick ) < longDelay );
  74. //}