Merge branch 'feature/prs_from_github' into 'master'

PRs from Github

See merge request !1578
This commit is contained in:
Ivan Grokhotkov 2017-11-22 22:26:40 +08:00
commit cf47012111
6 changed files with 29 additions and 12 deletions

View file

@ -41,8 +41,10 @@ void phy_rmii_configure_data_interface_pins(void)
void phy_rmii_smi_configure_pins(uint8_t mdc_gpio, uint8_t mdio_gpio)
{
gpio_matrix_out(mdc_gpio, EMAC_MDC_O_IDX, 0, 0);
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[mdc_gpio], PIN_FUNC_GPIO);
gpio_matrix_out(mdio_gpio, EMAC_MDO_O_IDX, 0, 0);
gpio_matrix_in(mdio_gpio, EMAC_MDI_I_IDX, 0);
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[mdio_gpio], PIN_FUNC_GPIO);
}
void phy_mii_enable_flow_ctrl(void)

View file

@ -253,6 +253,7 @@ int xt_clock_freq(void) __attribute__((deprecated));
#define INCLUDE_uxTaskGetStackHighWaterMark 1
#define INCLUDE_pcTaskGetTaskName 1
#define INCLUDE_xTaskGetIdleTaskHandle 1
#define INCLUDE_pxTaskGetStackStart 1
#define INCLUDE_xSemaphoreGetMutexHolder 1

View file

@ -3814,14 +3814,17 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask )
/*-----------------------------------------------------------*/
#if (INCLUDE_pxTaskGetStackStart == 1)
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask)
{
TCB_t *pxTCB;
UBaseType_t uxReturn;
pxTCB = prvGetTCBFromHandle( xTask );
return ( uint8_t * ) pxTCB->pxStack;
}
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask)
{
TCB_t *pxTCB;
uint8_t* uxReturn;
pxTCB = prvGetTCBFromHandle( xTask );
uxReturn = (uint8_t*)pxTCB->pxStack;
return uxReturn;
}
#endif /* INCLUDE_pxTaskGetStackStart */
/*-----------------------------------------------------------*/

View file

@ -55,11 +55,14 @@ void esp_log_level_set(const char* tag, esp_log_level_t level);
* @brief Set function used to output log entries
*
* By default, log output goes to UART0. This function can be used to redirect log
* output to some other destination, such as file or network.
* output to some other destination, such as file or network. Returns the original
* log handler, which may be necessary to return output to the previous destination.
*
* @param func Function used for output. Must have same signature as vprintf.
* @param func new Function used for output. Must have same signature as vprintf.
*
* @return func old Function used for output.
*/
void esp_log_set_vprintf(vprintf_like_t func);
vprintf_like_t esp_log_set_vprintf(vprintf_like_t func);
/**
* @brief Function which returns timestamp to be used in log output

View file

@ -106,9 +106,18 @@ static inline void heap_swap(int i, int j);
static inline bool should_output(esp_log_level_t level_for_message, esp_log_level_t level_for_tag);
static inline void clear_log_level_list();
void esp_log_set_vprintf(vprintf_like_t func)
vprintf_like_t esp_log_set_vprintf(vprintf_like_t func)
{
if (!s_log_mutex) {
s_log_mutex = xSemaphoreCreateMutex();
}
xSemaphoreTake(s_log_mutex, portMAX_DELAY);
vprintf_like_t orig_func = s_log_print_func;
s_log_print_func = func;
xSemaphoreGive(s_log_mutex);
return orig_func;
}
void esp_log_level_set(const char* tag, esp_log_level_t level)

View file

@ -72,7 +72,6 @@
#define MCU_SEL_M (MCU_SEL_V << MCU_SEL_S)
#define MCU_SEL_V 0x7
#define MCU_SEL_S 12
#define MCU_SEL_V 0x7
#define PIN_INPUT_ENABLE(PIN_NAME) SET_PERI_REG_MASK(PIN_NAME,FUN_IE)
#define PIN_INPUT_DISABLE(PIN_NAME) CLEAR_PERI_REG_MASK(PIN_NAME,FUN_IE)