# MAX72XX

## Functions
s32 | MAX72XX_Init (u32 mode)
s32 | MAX72XX_NumChainsGet (void)
s32 | MAX72XX_NumChainsSet (u8 num_chains)
s32 | MAX72XX_EnabledGet (u8 chain)
s32 | MAX72XX_EnabledSet (u8 chain, u8 enabled)
s32 | MAX72XX_NumDevicesPerChainGet (u8 chain)
s32 | MAX72XX_NumDevicesPerChainSet (u8 chain, u8 num_devices)
s32 | MAX72XX_DigitSet (u8 chain, u8 device, u8 digit, u8 value)
s32 | MAX72XX_AllDigitsSet (u8 chain, u8 device, u8 *values)
s32 | MAX72XX_DigitGet (u8 chain, u8 device, u8 digit)
s32 | MAX72XX_WriteReg (u8 chain, u8 device, u8 reg, u8 value)
s32 | MAX72XX_WriteAllRegs (u8 chain, u8 reg, u8 value)
s32 | MAX72XX_UpdateDigit (u8 chain, u8 digit)
s32 | MAX72XX_UpdateAllDigits (u8 chain)
s32 | MAX72XX_UpdateAllChains (void)

## Detailed Description

MAX72xx module driver

## Function Documentation

s32 MAX72XX_AllDigitsSet | ( | u8 | chain,
|  | u8 | device,
|  | u8 * | values |
| ) |  |  |

Sets all digits of the given chain and device

s32 MAX72XX_DigitGet | ( | u8 | chain,
|  | u8 | device,
|  | u8 | digit |
| ) |  |  |

Returns a digit of the given chain and device

s32 MAX72XX_DigitSet | ( | u8 | chain,
|  | u8 | device,
|  | u8 | digit,
|  | u8 | value |
| ) |  |  |

Sets a digit of the given chain and device

s32 MAX72XX_EnabledGet | ( | u8 | chain | ) |

Returns:
  the enable mask for chains which should be scanned

s32 MAX72XX_EnabledSet | ( | u8 | chain,
|  | u8 | enabled |
| ) |  |  |

Sets the enable mask for chains which should be scanned

s32 MAX72XX_Init | ( | u32 | mode | ) |

Initializes MAX72xx driver Should be called from Init() during startup

Parameters:

  `[in]` | mode | currently only mode 0 supported

Returns:
  < 0 if initialisation failed

Here is the call graph for this function:

s32 MAX72XX_NumChainsGet | ( | void |  | ) |

Returns:
  the number of chains which are scanned

s32 MAX72XX_NumChainsSet | ( | u8 | num_chains | ) |

Sets the number of chains which should be scanned

Returns:
  < 0 on error (e.g. unsupported number of chains)

s32 MAX72XX_NumDevicesPerChainGet | ( | u8 | chain | ) |

Returns:
  the number of devices per chain which are scanned

s32 MAX72XX_NumDevicesPerChainSet | ( | u8 | chain,
|  | u8 | num_devices |
| ) |  |  |

Sets the number of devices per chain which should be scanned

Returns:
  < 0 on error (e.g. unsupported number of devices)

s32 MAX72XX_UpdateAllChains | ( | void |  | ) |

Updates all chains

Here is the call graph for this function:

s32 MAX72XX_UpdateAllDigits | ( | u8 | chain | ) |

Updates all digits of the given chain

Here is the call graph for this function:

s32 MAX72XX_UpdateDigit | ( | u8 | chain,
|  | u8 | digit |
| ) |  |  |

Updates a digit (0..7) of the given chain

Here is the call graph for this function:

s32 MAX72XX_WriteAllRegs | ( | u8 | chain,
|  | u8 | reg,
|  | u8 | value |
| ) |  |  |

Load a 8bit value into all MAX72XX devices of the given chain

Here is the call graph for this function:

s32 MAX72XX_WriteReg | ( | u8 | chain,
|  | u8 | device,
|  | u8 | reg,
|  | u8 | value |
| ) |  |  |

Load a 16bit value into a selected MAX72XX device of the given chain

Here is the call graph for this function: