# modules/mbnet/mbnet.c File Reference

`#include <mios32.h>`
`#include <string.h>`
`#include <FreeRTOS.h>`
`#include <portmacro.h>`
`#include <app.h>`
`#include "mbnet.h"`
`#include "mbnet_hal.h"`

## Defines
#define | DEBUG_MSG MIOS32_MIDI_SendDebugMessage
#define | MBNET_TIMEOUT_CTR_MAX 5000
## Functions
s32 | MBNET_Init (u32 mode)
s32 | MBNET_VerboseLevelSet (u8 level)
s32 | MBNET_VerboseLevelGet ()
s32 | MBNET_NodeIDSet (u8 node_id)
s32 | MBNET_NodeIDGet (void)
s32 | MBNET_ScanFinished (void)
s32 | MBNET_SlaveNodeInfoGet (u8 slave_id, mbnet_msg_t **info)
s32 | MBNET_Reconnect (void)
s32 | MBNET_ErrorStateGet (void)
s32 | MBNET_SendReq (u8 slave_id, mbnet_tos_req_t tos_req, u16 control, mbnet_msg_t msg, u8 dlc)
s32 | MBNET_SendReqAgain (u8 slave_id)
s32 | MBNET_SendAck (u8 master_id, mbnet_tos_ack_t tos_ack, mbnet_msg_t msg, u8 dlc)
s32 | MBNET_WaitAck_NonBlocking (u8 slave_id, mbnet_msg_t *ack_msg, u8 *dlc)
s32 | MBNET_WaitAck (u8 slave_id, mbnet_msg_t *ack_msg, u8 *dlc)
s32 | MBNET_Handler (void(*callback)(u8 master_id, mbnet_tos_req_t tos, u16 control, mbnet_msg_t req_msg, u8 dlc))
s32 | MBNET_InstallTxHandler (s32(*tx_handler_callback)(mbnet_id_t *mbnet_id, mbnet_msg_t *msg, u8 *dlc))
s32 | MBNET_TriggerTxHandler (void)
s32 | MBNET_TerminalHelp (void *_output_function)
s32 | MBNET_TerminalParseLine (char *input, void *_output_function)
s32 | MBNET_TerminalPrintStatus (void *_output_function)
## Variables
mbnet_state_t | mbnet_state

## Define Documentation

#define DEBUG_MSG MIOS32_MIDI_SendDebugMessage

#define MBNET_TIMEOUT_CTR_MAX 5000

## Function Documentation

s32 MBNET_ErrorStateGet | ( | void |  | ) |

s32 MBNET_Handler | ( | void(*)(u8 master_id, mbnet_tos_req_t tos, u16 control, mbnet_msg_t req_msg, u8 dlc) | callback | ) |

Here is the call graph for this function:

s32 MBNET_Init | ( | u32 | mode | ) |

Here is the call graph for this function:

s32 MBNET_InstallTxHandler | ( | s32(*)(mbnet_id_t *mbnet_id, mbnet_msg_t *msg, u8 *dlc) | tx_handler_callback | ) |

Here is the call graph for this function:

s32 MBNET_NodeIDGet | ( | void |  | ) |

s32 MBNET_NodeIDSet | ( | u8 | node_id | ) |

Here is the call graph for this function:

s32 MBNET_Reconnect | ( | void |  | ) |

s32 MBNET_ScanFinished | ( | void |  | ) |

s32 MBNET_SendAck | ( | u8 | master_id,
|  | mbnet_tos_ack_t | tos_ack,
|  | mbnet_msg_t | msg,
|  | u8 | dlc |
| ) |  |  |

s32 MBNET_SendReq | ( | u8 | slave_id,
|  | mbnet_tos_req_t | tos_req,
|  | u16 | control,
|  | mbnet_msg_t | msg,
|  | u8 | dlc |
| ) |  |  |

s32 MBNET_SendReqAgain | ( | u8 | slave_id | ) |

s32 MBNET_SlaveNodeInfoGet | ( | u8 | slave_id,
|  | mbnet_msg_t ** | info |
| ) |  |  |

s32 MBNET_TerminalHelp | ( | void * | _output_function | ) |

Here is the call graph for this function:

s32 MBNET_TerminalParseLine | ( | char * | input,
|  | void * | _output_function |
| ) |  |  |

Here is the call graph for this function:

s32 MBNET_TerminalPrintStatus | ( | void * | _output_function | ) |

Here is the call graph for this function:

s32 MBNET_TriggerTxHandler | ( | void |  | ) |

Here is the call graph for this function:

s32 MBNET_VerboseLevelGet | ( |  | ) |

s32 MBNET_VerboseLevelSet | ( | u8 | level | ) |

s32 MBNET_WaitAck | ( | u8 | slave_id,
|  | mbnet_msg_t * | ack_msg,
|  | u8 * | dlc |
| ) |  |  |

Here is the call graph for this function:

s32 MBNET_WaitAck_NonBlocking | ( | u8 | slave_id,
|  | mbnet_msg_t * | ack_msg,
|  | u8 * | dlc |
| ) |  |  |

Here is the call graph for this function:

## Variable Documentation

mbnet_state_t mbnet_state