This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_dvr_XXX vs nrf_XXX

Hello, What is the diference between nrf_dvr_XXX vs nrf_XXX and why can't I add nrf_dvr_XXX to my project?

http://i.imgur.com/CZm9icm.png

And that is my packs: http://i.imgur.com/YdwadSe.png

Thank you

Parents
  • I think it is important to emphasise that in our case HAL is NOT the abbreviation for the Hardware Abstraction Layer, but it is the abbreviation for the Hardware Access Layer. The Hardware Access Layer gives you the ability to directly access hardware features, while not having to think in terms of registers and bitfields.

    For example, insted of writing a code in terms of bitfields and shifts like that:

    NRF_ADC->CONFIG =
        ((uint32_t)NRF_ADC_CONFIG_INPUT_0 << ADC_CONFIG_PSEL_Pos) | (NRF_ADC->CONFIG & ~ADC_CONFIG_PSEL_Msk);
    
        NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled << ADC_ENABLE_ENABLE_Pos;  
    

    you can use this HAL function:

    nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_0);
    

    HAL consists of simple, stateless and mostly inline functions. HAL functions are not drivers but are used by drivers as a fundation.

    All drivers can be used with and without SoftDevice. The API is the same for both cases. The only thing that you have to do is to define or not SOFTDEVICE_PRESENT in your project.

Reply
  • I think it is important to emphasise that in our case HAL is NOT the abbreviation for the Hardware Abstraction Layer, but it is the abbreviation for the Hardware Access Layer. The Hardware Access Layer gives you the ability to directly access hardware features, while not having to think in terms of registers and bitfields.

    For example, insted of writing a code in terms of bitfields and shifts like that:

    NRF_ADC->CONFIG =
        ((uint32_t)NRF_ADC_CONFIG_INPUT_0 << ADC_CONFIG_PSEL_Pos) | (NRF_ADC->CONFIG & ~ADC_CONFIG_PSEL_Msk);
    
        NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled << ADC_ENABLE_ENABLE_Pos;  
    

    you can use this HAL function:

    nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_0);
    

    HAL consists of simple, stateless and mostly inline functions. HAL functions are not drivers but are used by drivers as a fundation.

    All drivers can be used with and without SoftDevice. The API is the same for both cases. The only thing that you have to do is to define or not SOFTDEVICE_PRESENT in your project.

Children
No Data
Related