auralix / alx-202-af-10-1-auralix-c-lib

GNU General Public License v3.0
0 stars 0 forks source link

alxDac_McuStm32 - Implement for STM32G4 #25

Open tomazvidovic opened 1 year ago

tomazvidovic commented 1 year ago

seems like this section must be implemented, maybe more..

#if defined(ALX_STM32G4)
ALX_DAC_ASSERT(false);  // TODO - Not yet implemented
#endif

also this G4 has more than 1 ch I think..

static uint32_t AlxDac_GetCh(Alx_Ch ch)
{
    if(ch == Alx_Ch_1 ) return DAC_CHANNEL_1;
    #if defined(ALX_STM32F4) || defined(STM32L072xx) || defined(STM32L073xx) || defined(STM32L082xx) || defined(STM32L083xx) || defined(ALX_STM32L4)
    if(ch == Alx_Ch_2 ) return DAC_CHANNEL_2;
    #endif

    ALX_DAC_ASSERT(false);  // We should not get here
    return ALX_NULL;
}