enable -std=gnu11 for platform dir
This commit is contained in:
parent
3b589e2177
commit
0c3fc6cc78
|
@ -20,9 +20,9 @@ void spi_lcd_9bit_write(uint8 spi_no,uint8 high_bit,uint8 low_8bit);
|
||||||
//spi master init funtion
|
//spi master init funtion
|
||||||
void spi_master_init(uint8 spi_no, unsigned cpol, unsigned cpha, uint32_t clock_div);
|
void spi_master_init(uint8 spi_no, unsigned cpol, unsigned cpha, uint32_t clock_div);
|
||||||
// fill MOSI buffer
|
// fill MOSI buffer
|
||||||
void spi_set_mosi(uint8 spi_no, uint8 offset, uint8 bitlen, uint32 data);
|
void spi_mast_set_mosi(uint8 spi_no, uint8 offset, uint8 bitlen, uint32 data);
|
||||||
// retrieve data from MISO buffer
|
// retrieve data from MISO buffer
|
||||||
uint32 spi_get_miso(uint8 spi_no, uint8 offset, uint8 bitlen);
|
uint32 spi_mast_get_miso(uint8 spi_no, uint8 offset, uint8 bitlen);
|
||||||
// initiate SPI transaction
|
// initiate SPI transaction
|
||||||
void spi_mast_transaction(uint8 spi_no, uint8 cmd_bitlen, uint16 cmd_data, uint8 addr_bitlen, uint32 addr_data,
|
void spi_mast_transaction(uint8 spi_no, uint8 cmd_bitlen, uint16 cmd_data, uint8 addr_bitlen, uint32 addr_data,
|
||||||
uint16 mosi_bitlen, uint8 dummy_bitlen, sint16 miso_bitlen);
|
uint16 mosi_bitlen, uint8 dummy_bitlen, sint16 miso_bitlen);
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#ifndef __SPI_MASTER_H__
|
|
||||||
#define __SPI_MASTER_H__
|
|
||||||
|
|
||||||
#include "driver/spi_register.h"
|
|
||||||
|
|
||||||
/*SPI number define*/
|
|
||||||
#define SPI 0
|
|
||||||
#define HSPI 1
|
|
||||||
|
|
||||||
void spi_master_init(uint8 spi_no);
|
|
||||||
void spi_master_9bit_write(uint8 spi_no, uint8 high_bit, uint8 low_8bit);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -15,6 +15,8 @@ ifndef PDIR
|
||||||
GEN_LIBS = libplatform.a
|
GEN_LIBS = libplatform.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
STD_CFLAGS=-std=gnu11 -Wimplicit
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
# Configuration i.e. compile options etc.
|
# Configuration i.e. compile options etc.
|
||||||
# Target specific stuff (defines etc.) goes in here!
|
# Target specific stuff (defines etc.) goes in here!
|
||||||
|
|
|
@ -376,13 +376,6 @@ bool flash_init_data_blank(void)
|
||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool flash_self_destruct(void)
|
|
||||||
{
|
|
||||||
// Dangerous, Erase your flash. Good bye!
|
|
||||||
SPIEraseChip();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t byte_of_aligned_array(const uint8_t *aligned_array, uint32_t index)
|
uint8_t byte_of_aligned_array(const uint8_t *aligned_array, uint32_t index)
|
||||||
{
|
{
|
||||||
if ( (((uint32_t)aligned_array) % 4) != 0 )
|
if ( (((uint32_t)aligned_array) % 4) != 0 )
|
||||||
|
|
|
@ -103,7 +103,6 @@ uint32_t flash_rom_get_speed(void);
|
||||||
bool flash_init_data_written(void);
|
bool flash_init_data_written(void);
|
||||||
bool flash_init_data_default(void);
|
bool flash_init_data_default(void);
|
||||||
bool flash_init_data_blank(void);
|
bool flash_init_data_blank(void);
|
||||||
bool flash_self_destruct(void);
|
|
||||||
uint8_t byte_of_aligned_array(const uint8_t* aligned_array, uint32_t index);
|
uint8_t byte_of_aligned_array(const uint8_t* aligned_array, uint32_t index);
|
||||||
uint16_t word_of_aligned_array(const uint16_t *aligned_array, uint32_t index);
|
uint16_t word_of_aligned_array(const uint16_t *aligned_array, uint32_t index);
|
||||||
// uint8_t flash_rom_get_checksum(void);
|
// uint8_t flash_rom_get_checksum(void);
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
// Platform-dependent functions
|
// Platform-dependent functions
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#include "common.h"
|
||||||
#include "c_stdio.h"
|
#include "c_stdio.h"
|
||||||
#include "c_string.h"
|
#include "c_string.h"
|
||||||
#include "c_stdlib.h"
|
#include "c_stdlib.h"
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
#include "user_interface.h"
|
#include "user_interface.h"
|
||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
|
#include "driver/gpio16.h"
|
||||||
|
#include "driver/i2c_master.h"
|
||||||
|
#include "driver/spi.h"
|
||||||
// Platform specific includes
|
// Platform specific includes
|
||||||
|
|
||||||
static void pwms_init();
|
static void pwms_init();
|
||||||
|
|
Loading…
Reference in New Issue