mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	Move CC1310 platform init around
This commit is contained in:
		
							parent
							
								
									7d9ff0a602
								
							
						
					
					
						commit
						2642e490ae
					
				
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -275,4 +275,6 @@ doc/build
 | 
				
			|||||||
.vscode/.browse.c_cpp.db*
 | 
					.vscode/.browse.c_cpp.db*
 | 
				
			||||||
.vscode/c_cpp_properties.json
 | 
					.vscode/c_cpp_properties.json
 | 
				
			||||||
.vscode/launch.json
 | 
					.vscode/launch.json
 | 
				
			||||||
.vscode/ipch
 | 
					.vscode/ipch
 | 
				
			||||||
 | 
					.vscode/.cortex-debug.registers.state.json
 | 
				
			||||||
 | 
					.vscode/.cortex-debug.peripherals.state.json
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,7 @@ void setup()
 | 
				
			|||||||
    pKnx = new KnxFacade<CC1310Platform, Bau07B0>;
 | 
					    pKnx = new KnxFacade<CC1310Platform, Bau07B0>;
 | 
				
			||||||
    KnxFacade<CC1310Platform, Bau07B0> &knx = *pKnx;
 | 
					    KnxFacade<CC1310Platform, Bau07B0> &knx = *pKnx;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    knx.platform().earlyInit();
 | 
					    knx.platform().init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    knx.readMemory();
 | 
					    knx.readMemory();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -107,13 +107,6 @@ int main(void)
 | 
				
			|||||||
    // Call driver init functions before starting NoRTOS/RTOS
 | 
					    // Call driver init functions before starting NoRTOS/RTOS
 | 
				
			||||||
    Board_init();
 | 
					    Board_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TI Drivers init before starting NoRTOS/RTOS
 | 
					 | 
				
			||||||
    UART_init();
 | 
					 | 
				
			||||||
    NVS_init();
 | 
					 | 
				
			||||||
    //I2C_init();
 | 
					 | 
				
			||||||
    //SPI_init();
 | 
					 | 
				
			||||||
    //TRNG_init();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Start NoRTOS (this just enables the HwI globally and returns immediately as
 | 
					    // Start NoRTOS (this just enables the HwI globally and returns immediately as
 | 
				
			||||||
    //               we are not using RTOS here)
 | 
					    //               we are not using RTOS here)
 | 
				
			||||||
    NoRTOS_start();
 | 
					    NoRTOS_start();
 | 
				
			||||||
 | 
				
			|||||||
@ -76,8 +76,14 @@ CC1310Platform::~CC1310Platform()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CC1310Platform::earlyInit() 
 | 
					void CC1310Platform::init() 
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    // TI Drivers init
 | 
				
			||||||
 | 
					    // According to SDK docs it is safe to call them AFTER NoRTOS_Start()
 | 
				
			||||||
 | 
					    // If RTOS is used and multiple thread use the same driver, then the init shall be performed before BIOS_Start()
 | 
				
			||||||
 | 
					    UART_init();
 | 
				
			||||||
 | 
					    NVS_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Init UART
 | 
					    // Init UART
 | 
				
			||||||
    InitUART();
 | 
					    InitUART();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,7 @@ class CC1310Platform : public Platform
 | 
				
			|||||||
    CC1310Platform();
 | 
					    CC1310Platform();
 | 
				
			||||||
    virtual ~CC1310Platform();
 | 
					    virtual ~CC1310Platform();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void earlyInit();
 | 
					    void init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // basic stuff
 | 
					    // basic stuff
 | 
				
			||||||
    virtual void restart() final;
 | 
					    virtual void restart() final;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user