main_page.dox 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. @mainpage Introduction
  3. @em nrfx is an extract from the nRF5 SDK that contains solely the drivers for
  4. peripherals present in Nordic SoCs, for convenience complemented with the MDK
  5. package containing required structures and bitfields definitions, startup
  6. files etc.
  7. Refer to the @ref nrfx_drv_supp_matrix to check which drivers are suitable
  8. for a given SoC.
  9. @section nrfx_integration Integration
  10. The purpose of @em nrfx is to make it possible to use the same set of peripheral
  11. drivers in various environments, from RTOSes to bare metal applications.
  12. Hence, for a given host environment, a light integration layer must be provided
  13. that implements certain specific routines, like interrupt management, critical
  14. sections, assertions, or logging. This is done by filling a predefined set of
  15. macros with proper implementations (or keeping some empty if desired) in files
  16. named:
  17. - @ref nrfx_glue
  18. - @ref nrfx_log
  19. Templates of these files are provided
  20. in the <a href="../../templates/">templates</a> subfolder. Their customized
  21. versions can be placed in any location within the host environment that the
  22. used compiler can access via include paths.
  23. In addition, the following locations should be specified as include paths
  24. ([nrfx] stands for the @em nrfx root folder location):
  25. @code
  26. [nrfx]/
  27. [nrfx]/drivers/include
  28. [nrfx]/mdk
  29. @endcode
  30. @section nrfx_irq_handlers IRQ handlers
  31. The IRQ handlers in all drivers are implemented as ordinary API functions
  32. named "nrfx_*_irq_handler". They can be bound to some structures or called in
  33. a specific way according to the requirements of the host environment.
  34. To install the handlers in the standard MDK way, you must only add the following
  35. line to the @ref nrfx_glue file:
  36. @code
  37. #include <soc/nrfx_irqs.h>
  38. @endcode
  39. This will cause the preprocessor to properly rename all the IRQ handler
  40. functions so that the linker could install them in the vector table.
  41. @section nrfx_configuration Configuration
  42. The drivers use both dynamic (run time) and static (compile time) configuration.
  43. Dynamic configuration is done by specifying desired options in configuration
  44. structures passed to the drivers during their initialization.
  45. Refer to the API reference for a given driver to see the members of its
  46. configuration structure.
  47. Static configuration allows enabling and disabling (excluding their code from
  48. compilation) particular drivers or in some cases their specific features,
  49. defining default parameters for dynamic configuration, parametrization of
  50. logging in particular drivers. It is done by specifying desired values of macros
  51. in a file named:
  52. - nrfx_config.h
  53. This file, similarly to the integration files mentioned above, can be placed
  54. in any suitable location within the host environment.
  55. The <a href="../../templates/">templates</a> subfolder contains templates of
  56. configuration files for all currently supported Nordic SoCs placed in respective
  57. subfolders.
  58. Refer to the "driver configuration" section in the API reference for a given
  59. driver for more information regarding configuration options available for it.
  60. @section nrfx_additional_reqs Additional requirements
  61. Nordic SoCs are based on ARM® Cortex™-M series processors. Before you can
  62. start developing with @em nrfx, you must add the CMSIS header files to include
  63. paths during the compilation process. Download these files from the following
  64. website:
  65. - <a href="https://github.com/ARM-software/CMSIS"> ARM® CMSIS repository</a>
  66. (CMSIS/Include directory)
  67. */