main_page.dox 3.6 KB

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