123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- #ifndef NRFX_TEMP_H__
- #define NRFX_TEMP_H__
- #include <nrfx.h>
- #include <hal/nrf_temp.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct
- {
- uint8_t interrupt_priority;
- } nrfx_temp_config_t;
- #define NRFX_TEMP_DEFAULT_CONFIG \
- { \
- .interrupt_priority = NRFX_TEMP_DEFAULT_CONFIG_IRQ_PRIORITY, \
- }
- typedef void (* nrfx_temp_data_handler_t)(int32_t raw_temperature);
- nrfx_err_t nrfx_temp_init(nrfx_temp_config_t const * p_config, nrfx_temp_data_handler_t handler);
- void nrfx_temp_uninit(void);
- __STATIC_INLINE int32_t nrfx_temp_result_get(void);
- int32_t nrfx_temp_calculate(int32_t raw_measurement);
- nrfx_err_t nrfx_temp_measure(void);
- #ifndef SUPPRESS_INLINE_IMPLEMENTATION
- __STATIC_INLINE int32_t nrfx_temp_result_get(void)
- {
- return nrf_temp_result_get(NRF_TEMP);
- }
- #endif
- void nrfx_temp_irq_handler(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|