Here is my code
- void app_main(void)
- {
- esp_err_t ret = nvs_flash_init();
- if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
- ESP_ERROR_CHECK(nvs_flash_erase());
- ret = nvs_flash_init();
- }
- ESP_ERROR_CHECK(ret);
- ESP_LOGI(TAG, "Starting up!");
- //vSetGPIOlevel(GPIO_NUM_18,1);
- //vSetGPIOlevel(GPIO_NUM_19,1);
- spi_transaction_t spitHandler = init_spi();
- while(1){
- sleep(1);
- uint32_t dataOut = readEMregister(0xc001,spitHandler );
- ESP_LOGI(TAG, "Register is %04X " ,dataOut );
- }
- }
How can i print it correctly, i dont want to split it and then print