# modules/mbnet/LPC17xx/mbnet_hal.c File Reference

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

## Defines
#define | MBNET_CAN LPC_CAN2
#define | MBNET_CAN_IX 1
#define | CAN_PERIPHERAL_FRQ (MIOS32_SYS_CPU_FREQUENCY)
#define | MBNET_RXD_INIT { MIOS32_SYS_LPC_PINSEL(0, 4, 2); }
#define | MBNET_TXD_INIT { MIOS32_SYS_LPC_PINSEL(0, 5, 2); }
#define | MBNET_RX_FIFO_SIZE MBNET_SLAVE_NODES_MAX
## Functions
s32 | MBNET_HAL_Init (u32 mode)
s32 | MBNET_HAL_FilterInit (u8 node_id)
s32 | MBNET_HAL_Send (mbnet_id_t mbnet_id, mbnet_msg_t msg, u8 dlc)
s32 | MBNET_HAL_ReceiveAck (mbnet_packet_t *p)
s32 | MBNET_HAL_ReceiveReq (mbnet_packet_t *p)
s32 | MBNET_HAL_BusErrorCheck (void)
void | CAN_IRQHandler (void)
s32 | MBNET_HAL_InstallTxHandler (s32(*_tx_handler_callback)(mbnet_id_t *mbnet_id, mbnet_msg_t *msg, u8 *dlc))
s32 | MBNET_HAL_TriggerTxHandler (void)
## Variables
s32(* | tx_handler_callback )(mbnet_id_t *mbnet_id, mbnet_msg_t *msg, u8 *dlc)

## Define Documentation

#define CAN_PERIPHERAL_FRQ (MIOS32_SYS_CPU_FREQUENCY)

#define MBNET_CAN LPC_CAN2

#define MBNET_CAN_IX 1

#define MBNET_RX_FIFO_SIZE MBNET_SLAVE_NODES_MAX

#define MBNET_RXD_INIT { MIOS32_SYS_LPC_PINSEL(0, 4, 2); }

#define MBNET_TXD_INIT { MIOS32_SYS_LPC_PINSEL(0, 5, 2); }

## Function Documentation

void CAN_IRQHandler | ( | void |  | ) |

Here is the call graph for this function:

s32 MBNET_HAL_BusErrorCheck | ( | void |  | ) |

s32 MBNET_HAL_FilterInit | ( | u8 | node_id | ) |

s32 MBNET_HAL_Init | ( | u32 | mode | ) |

s32 MBNET_HAL_InstallTxHandler | ( | s32(*)(mbnet_id_t *mbnet_id, mbnet_msg_t *msg, u8 *dlc) | _tx_handler_callback | ) |

s32 MBNET_HAL_ReceiveAck | ( | mbnet_packet_t * | p | ) |

s32 MBNET_HAL_ReceiveReq | ( | mbnet_packet_t * | p | ) |

s32 MBNET_HAL_Send | ( | mbnet_id_t | mbnet_id,
|  | mbnet_msg_t | msg,
|  | u8 | dlc |
| ) |  |  |

s32 MBNET_HAL_TriggerTxHandler | ( | void |  | ) |

## Variable Documentation

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