# modules/genesis/genesis.c File Reference

`#include <mios32.h>`
`#include "genesis.h"`

## Defines
#define | GENESIS_OPN2_WRITEWAIT do { u8 temp = 0; while(++temp <= (GENESIS_OPN2_WRITETIMEOUT >> 2)); } while(false)
#define | GENESIS_PSG_WRITEWAIT do { u8 temp = 0; while(++temp <= (GENESIS_PSG_WRITETIMEOUT >> 2)); } while(false)
## Functions
void | Genesis_Init ()
void | Genesis_OPN2Write (u8 board, u8 addrhi, u8 address, u8 data)
void | Genesis_PSGWrite (u8 board, u8 data)
bool | Genesis_CheckOPN2Busy (u8 board)
bool | Genesis_CheckPSGBusy (u8 board)
void | Genesis_WriteBoardBits (u8 board)
void | Genesis_Reset (u8 board)
## Variables
genesis_t | genesis [GENESIS_COUNT]

## Define Documentation

#define GENESIS_OPN2_WRITEWAIT do { u8 temp = 0; while(++temp <= (GENESIS_OPN2_WRITETIMEOUT >> 2)); } while(false)

#define GENESIS_PSG_WRITEWAIT do { u8 temp = 0; while(++temp <= (GENESIS_PSG_WRITETIMEOUT >> 2)); } while(false)

## Function Documentation

bool Genesis_CheckOPN2Busy | ( | u8 | board | ) |

Here is the call graph for this function:

bool Genesis_CheckPSGBusy | ( | u8 | board | ) |

Here is the call graph for this function:

void Genesis_Init | ( | void |  | ) |

Here is the call graph for this function:

void Genesis_OPN2Write | ( | u8 | board,
|  | u8 | addrhi,
|  | u8 | address,
|  | u8 | data |
| ) |  |  |

Here is the call graph for this function:

void Genesis_PSGWrite | ( | u8 | board,
|  | u8 | data |
| ) |  |  |

Here is the call graph for this function:

void Genesis_Reset | ( | u8 | board | ) |

Here is the call graph for this function:

void Genesis_WriteBoardBits | ( | u8 | board | ) |

Here is the call graph for this function:

## Variable Documentation

genesis_t genesis[GENESIS_COUNT]