ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bm_internal.h File Reference

ISF bus management internal header file. More...

#include <isf_comm.h>
#include "isf_bm.h"
Include dependency graph for bm_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bm_cb_config_t
 
struct  bm_t
 

Macros

#define BM_VOLATILE   volatile
 
#define BM_STATIC   static
 
#define BM_MINIMUM_CB_TIMELEFT_USEC   (100)
 
#define BM_ALLOC_MEM_ZERO(x)   _lwmem_alloc_system_zero(x)
 
#define BM_FREE_MEM(x)   _lwmem_free(x)
 
#define BM_MIN_REMAINING_THRESHOLD_USEC   (10)
 
#define BM_FULL_PERIOD   1
 
#define BM_CURRENT_PERIOD   2
 
#define BM_PIPELINE_STAGES   2
 

Functions

boolean bm_active_cb_query (void)
 Tells caller if there are active callbacks.
. More...
 
uint32 bm_powerdown (void)
 Prepare bm for powerdown state. Called by power manager.
. More...
 
boolean bm_statechange_query (void)
 Tells caller if there a change in the state of the
bus manager. Change could be: More...
 
boolean bm_cb_occurred_query (void)
 Tells caller if a callback was scheduled to be called since setting bus manager for powerdown mode. More...
 
void bm_statechange_reset (void)
 Reset the state change. More...
 

Variables

bm_t bm
 

Detailed Description

ISF bus management internal header file.

Definition in file bm_internal.h.

Macro Definition Documentation

#define BM_ALLOC_MEM_ZERO (   x)    _lwmem_alloc_system_zero(x)

Definition at line 55 of file bm_internal.h.

Referenced by bm_register_periodic_callback().

#define BM_CURRENT_PERIOD   2

Definition at line 63 of file bm_internal.h.

Referenced by bm_update_cb_list().

#define BM_FREE_MEM (   x)    _lwmem_free(x)

Definition at line 56 of file bm_internal.h.

Referenced by bm_unregister_callback().

#define BM_FULL_PERIOD   1

Definition at line 62 of file bm_internal.h.

Referenced by bm_find_smallest_active_period().

#define BM_MIN_REMAINING_THRESHOLD_USEC   (10)

Definition at line 58 of file bm_internal.h.

#define BM_MINIMUM_CB_TIMELEFT_USEC   (100)

Definition at line 53 of file bm_internal.h.

Referenced by bm_update_cb_list().

#define BM_PIPELINE_STAGES   2

Definition at line 64 of file bm_internal.h.

Referenced by bm_init(), and isr_bm_callback_tmr().

#define BM_STATIC   static

Definition at line 34 of file bm_internal.h.

#define BM_VOLATILE   volatile

Definition at line 33 of file bm_internal.h.

Function Documentation

boolean bm_active_cb_query ( void  )

Tells caller if there are active callbacks.
.

Returns
TRUE if there are active callbacks. FALSE otherwise.
Errors:

Constraints:

Reentrant: No.
Link Libraries:

See also

Definition at line 1085 of file bus_management.c.

References bm_t::cb_token_active_mask, FALSE, sema_bm_access, and TRUE.

boolean bm_cb_occurred_query ( void  )

Tells caller if a callback was scheduled to be called since setting bus manager for powerdown mode.

Returns
TRUE if there was a state change FALSE otherwise.
Errors:

Constraints:

Reentrant: No.
Link Libraries:

See also

Definition at line 1061 of file bus_management.c.

References gBm_cb_occurred.

uint32 bm_powerdown ( void  )

Prepare bm for powerdown state. Called by power manager.
.

Returns
Remaining time to next callback scheduled in microseconds.
Errors:

Constraints:

Reentrant: No.
Link Libraries:

See also

Definition at line 937 of file bus_management.c.

References bmPITInstance, bm_t::cb_token_active_mask, FALSE, gBm_cb_occurred, gBm_state_change, pit_timer_stop(), and bm_t::time_keeper_usec.

Here is the call graph for this function:

boolean bm_statechange_query ( void  )

Tells caller if there a change in the state of the
bus manager. Change could be:

  • New registerd callback(s)
  • Unregister of callback(s)
  • Change of start to stop state

Note that this function is typically called by the power manager (at lowest priority) in ilde mode and all other tasks are blocked. Which means we do not need to protect the read with semaphores and incur latency associated with it.

Returns
TRUE if there was a state change FALSE otherwise.
Errors:

Constraints:

Reentrant: No.
Link Libraries:

See also

Definition at line 1001 of file bus_management.c.

References gBm_state_change.

void bm_statechange_reset ( void  )

Reset the state change.

Errors:

Constraints:

Reentrant: No.
Link Libraries:

See also

Definition at line 1028 of file bus_management.c.

References FALSE, gBm_state_change, and sema_bm_access.

Variable Documentation

bm_t bm

Definition at line 46 of file bus_management.c.