Yuliya Smirnova
/
h7adc
stm32h7 udp server with adc
Diff: main.cpp
- Revision:
- 3:5f002243ff14
- Parent:
- 2:fcb521c36965
- Child:
- 4:55a7bfd3a297
--- a/main.cpp Tue Oct 27 12:13:27 2020 +0000 +++ b/main.cpp Tue Oct 27 13:24:43 2020 +0000 @@ -71,11 +71,15 @@ uint32_t buf = 0xAA; + struct ADE7912_Inst *ade = New_ADE7912(&hspi1); struct ADE7912_Phase_Settings a_phase; a_phase.CS_pin = SPI1_CS_Pin; a_phase.CS_port = SPI1_CS_GPIO_Port; + + ADE7912_PhaseInit(ade, &a_phase, PHASE_A); + ADE7912_EnablePhase(ade, PHASE_A); uint32_t tickCount = osKernelSysTick();