Minor fixups
This commit is contained in:
parent
8a9ed5195b
commit
d528fb218d
@ -226,7 +226,7 @@ SEPARATE_MEMBER_PAGES = NO
|
|||||||
# uses this value to replace tabs by spaces in code fragments.
|
# uses this value to replace tabs by spaces in code fragments.
|
||||||
# Minimum value: 1, maximum value: 16, default value: 4.
|
# Minimum value: 1, maximum value: 16, default value: 4.
|
||||||
|
|
||||||
TAB_SIZE = 2
|
TAB_SIZE = 4
|
||||||
|
|
||||||
# This tag can be used to specify a number of aliases that act as commands in
|
# This tag can be used to specify a number of aliases that act as commands in
|
||||||
# the documentation. An alias has the form:
|
# the documentation. An alias has the form:
|
||||||
@ -805,6 +805,8 @@ RECURSIVE = YES
|
|||||||
|
|
||||||
EXCLUDE = boards \
|
EXCLUDE = boards \
|
||||||
drivers \
|
drivers \
|
||||||
|
tools \
|
||||||
|
3rdparty \
|
||||||
demos
|
demos
|
||||||
|
|
||||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||||
|
@ -48,13 +48,13 @@ static struct ADCDriver ADCD;
|
|||||||
#define YPOS 11 // D
|
#define YPOS 11 // D
|
||||||
|
|
||||||
static const ADCConversionGroup ADC_X_CG = {
|
static const ADCConversionGroup ADC_X_CG = {
|
||||||
.circular = FALSE,
|
.circular = 0,
|
||||||
.num_channels = 1,
|
.num_channels = 1,
|
||||||
.channels = 1 << XNEG,
|
.channels = 1 << XNEG,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ADCConversionGroup ADC_Y_CG = {
|
static const ADCConversionGroup ADC_Y_CG = {
|
||||||
.circular = FALSE,
|
.circular = 0,
|
||||||
.num_channels = 1,
|
.num_channels = 1,
|
||||||
.channels = 1 << YPOS,
|
.channels = 1 << YPOS,
|
||||||
};
|
};
|
||||||
|
@ -74,7 +74,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
|||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
|
|
||||||
return FALSE;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* HAL_USE_SDC */
|
#endif /* HAL_USE_SDC */
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
|||||||
|
|
||||||
(void)mmcp;
|
(void)mmcp;
|
||||||
|
|
||||||
return FALSE;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ return (bool_t)!palReadPad(GPIOD, GPIOD_SDIO_CD_N);
|
|||||||
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||||
|
|
||||||
(void)sdcp;
|
(void)sdcp;
|
||||||
return FALSE;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* HAL_USE_SDC */
|
#endif /* HAL_USE_SDC */
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#define ADC_BUF_DEPTH 1
|
#define ADC_BUF_DEPTH 1
|
||||||
|
|
||||||
static const ADCConversionGroup adcgrpcfg = {
|
static const ADCConversionGroup adcgrpcfg = {
|
||||||
FALSE,
|
0,
|
||||||
ADC_NUM_CHANNELS,
|
ADC_NUM_CHANNELS,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -84,9 +84,9 @@
|
|||||||
gU8 data[2]; \
|
gU8 data[2]; \
|
||||||
data[0] = 0; \
|
data[0] = 0; \
|
||||||
data[1] = cmd; \
|
data[1] = cmd; \
|
||||||
i2cMasterTransmitTimeout (UEXT_I2C, I2C_ADDRESS, data, 2, 0, 0, gDelayForever); \
|
i2cMasterTransmitTimeout (UEXT_I2C, I2C_ADDRESS, data, 2, 0, 0, TIME_INFINITE); \
|
||||||
}
|
}
|
||||||
#define I2C_WRITEBYTES(pdata, len) i2cMasterTransmitTimeout (UEXT_I2C, I2C_ADDRESS, pdata, length, 0, 0, gDelayForever)
|
#define I2C_WRITEBYTES(pdata, len) i2cMasterTransmitTimeout (UEXT_I2C, I2C_ADDRESS, pdata, length, 0, 0, TIME_INFINITE)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "SSD1306 board file: Unsupported I2C method"
|
#error "SSD1306 board file: Unsupported I2C method"
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#define ADC_BUF_DEPTH 1
|
#define ADC_BUF_DEPTH 1
|
||||||
|
|
||||||
static const ADCConversionGroup adc_y_config = {
|
static const ADCConversionGroup adc_y_config = {
|
||||||
FALSE,
|
0,
|
||||||
ADC_NUM_CHANNELS,
|
ADC_NUM_CHANNELS,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -39,7 +39,7 @@ static const ADCConversionGroup adc_y_config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const ADCConversionGroup adc_x_config = {
|
static const ADCConversionGroup adc_x_config = {
|
||||||
FALSE,
|
0,
|
||||||
ADC_NUM_CHANNELS,
|
ADC_NUM_CHANNELS,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
2
demos/3rdparty/notepad-2/main.c
vendored
2
demos/3rdparty/notepad-2/main.c
vendored
@ -2,7 +2,7 @@
|
|||||||
* File: main.c
|
* File: main.c
|
||||||
*
|
*
|
||||||
* This file is a part of the Notepad demo application for ChibiOS/GFX
|
* This file is a part of the Notepad demo application for ChibiOS/GFX
|
||||||
* Copyright © 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com].
|
* Copyright 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com].
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -47,7 +47,7 @@ static GGraphStyle GraphStyle1 = {
|
|||||||
{ GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
|
{ GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
|
||||||
{ GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
|
{ GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
|
||||||
{ GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
|
{ GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
|
||||||
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
|
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
|
||||||
};
|
};
|
||||||
|
|
||||||
// Another graph styling
|
// Another graph styling
|
||||||
@ -58,7 +58,7 @@ static const GGraphStyle GraphStyle2 = {
|
|||||||
{ GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
|
{ GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
|
||||||
{ GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
|
{ GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
|
||||||
{ GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
|
{ GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
|
||||||
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
|
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
@ -67,6 +67,8 @@
|
|||||||
LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
|
LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
|
||||||
// The private area is the display surface.
|
// The private area is the display surface.
|
||||||
g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * SSD1322_ROW_WIDTH);
|
g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * SSD1322_ROW_WIDTH);
|
||||||
|
if (!g->priv)
|
||||||
|
return gFalse;
|
||||||
|
|
||||||
// Initialise the board interface
|
// Initialise the board interface
|
||||||
init_board(g);
|
init_board(g);
|
||||||
|
16
src/gfx.h
16
src/gfx.h
@ -33,13 +33,11 @@ extern "C" {
|
|||||||
#define GFX_COMPILESTAGE_PREP 1 // gfx.h: Initial preparation
|
#define GFX_COMPILESTAGE_PREP 1 // gfx.h: Initial preparation
|
||||||
#define GFX_COMPILESTAGE_USERCONFIG 2 // gfx.h: Load the user configuration
|
#define GFX_COMPILESTAGE_USERCONFIG 2 // gfx.h: Load the user configuration
|
||||||
#define GFX_COMPILESTAGE_COMPILECONFIG 3 // gfx.h: Determine build environment info - COMPILER, CPU etc
|
#define GFX_COMPILESTAGE_COMPILECONFIG 3 // gfx.h: Determine build environment info - COMPILER, CPU etc
|
||||||
#define GFX_COMPILESTAGE_OPTIONS 3 // gfx.h: Enumerate all options
|
#define GFX_COMPILESTAGE_OPTIONS 4 // gfx.h: Enumerate all options
|
||||||
#define GFX_COMPILESTAGE_DRIVERCONFIG 4 // gfx.h: Load driver configuration
|
#define GFX_COMPILESTAGE_RULES 5 // gfx.h: Apply configuration rules
|
||||||
#define GFX_COMPILESTAGE_DRIVERAPI 5 // gfx.h: Load driver public api
|
#define GFX_COMPILESTAGE_APIDEFS 6 // gfx.h: Define API definitions
|
||||||
#define GFX_COMPILESTAGE_RULES 6 // gfx.h: Apply configuration rules
|
#define GFX_COMPILESTAGE_COMPILECAPI 100 // gfx.c: Compile the uGFX C API
|
||||||
#define GFX_COMPILESTAGE_APIDEFS 7 // gfx.h: Define API definitions
|
#define GFX_COMPILESTAGE_COMPILEDRIVERINIT 101 // gfx.c: Compile driver init structures
|
||||||
#define GFX_COMPILESTAGE_COMPILEDRIVERS 100 // gfx.c: Compile drivers
|
|
||||||
#define GFX_COMPILESTAGE_COMPILECAPI 101 // gfx.c: Compile the uGFX C API
|
|
||||||
#define GFX_COMPILESTAGE_COMPILECPPAPI 102 // gfx.cpp: Compile the uGFX C++ API
|
#define GFX_COMPILESTAGE_COMPILECPPAPI 102 // gfx.cpp: Compile the uGFX C++ API
|
||||||
|
|
||||||
// ------------------------------ Load the user configuration ---------------------------------
|
// ------------------------------ Load the user configuration ---------------------------------
|
||||||
@ -134,10 +132,6 @@ extern "C" {
|
|||||||
#include "gadc/gadc_options.h"
|
#include "gadc/gadc_options.h"
|
||||||
#include "gaudio/gaudio_options.h"
|
#include "gaudio/gaudio_options.h"
|
||||||
|
|
||||||
// ------------------------------ Load driver configuration ---------------------------------
|
|
||||||
#undef GFX_COMPILESTAGE
|
|
||||||
#define GFX_COMPILESTAGE GFX_COMPILESTAGE_DRIVERCONFIG
|
|
||||||
|
|
||||||
// ------------------------------ Apply configuration rules ---------------------------------
|
// ------------------------------ Apply configuration rules ---------------------------------
|
||||||
#undef GFX_COMPILESTAGE
|
#undef GFX_COMPILESTAGE
|
||||||
#define GFX_COMPILESTAGE GFX_COMPILESTAGE_RULES
|
#define GFX_COMPILESTAGE GFX_COMPILESTAGE_RULES
|
||||||
|
@ -5,6 +5,12 @@
|
|||||||
* http://ugfx.io/license.html
|
* http://ugfx.io/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file src/gfx_mk.c
|
||||||
|
* @brief Single File Make.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include the "Single File Make" compatible parts of uGFX
|
||||||
#include "gfx.c"
|
#include "gfx.c"
|
||||||
#include "gos/gos_mk.c"
|
#include "gos/gos_mk.c"
|
||||||
#include "gdriver/gdriver_mk.c"
|
#include "gdriver/gdriver_mk.c"
|
||||||
|
@ -500,7 +500,7 @@ static void MousePoll(void *param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set up the calibration display
|
// Set up the calibration display
|
||||||
gdispGClear(m->display, GFX_BLUE);
|
gdispGClear(m->display, CALIBRATION_BACKGROUND);
|
||||||
#if GDISP_NEED_TEXT
|
#if GDISP_NEED_TEXT
|
||||||
gdispGFillStringBox(m->display,
|
gdispGFillStringBox(m->display,
|
||||||
0, CALIBRATION_TITLE_Y, w, CALIBRATION_TITLE_HEIGHT,
|
0, CALIBRATION_TITLE_Y, w, CALIBRATION_TITLE_HEIGHT,
|
||||||
|
@ -568,4 +568,4 @@ gThreadreturn gfxThreadWait(gThread th) {
|
|||||||
return (gThreadreturn)t->param;
|
return (gThreadreturn)t->param;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* GFX_USE_OS_RAW32 */
|
#endif
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* The context is saved at the current stack location and a pointer is maintained in the thread structure.
|
* The context is saved at the current stack location and a pointer is maintained in the thread structure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if CORTEX_USE_FPU
|
#if defined(CORTEX_USE_FPU) && CORTEX_USE_FPU
|
||||||
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
||||||
#warning "GOS Threads: You have specified GFX_CPU=GFX_CPU_CORTX_M? with no hardware floating point support but CORTEX_USE_FPU is GFXON. Try using GFX_CPU_GFX_CPU_CORTEX_M?_FP instead"
|
#warning "GOS Threads: You have specified GFX_CPU=GFX_CPU_CORTX_M? with no hardware floating point support but CORTEX_USE_FPU is GFXON. Try using GFX_CPU_GFX_CPU_CORTEX_M?_FP instead"
|
||||||
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#if CORTEX_USE_FPU
|
#if defined(CORTEX_USE_FPU) && CORTEX_USE_FPU
|
||||||
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
||||||
#warning "GOS Threads: You have specified GFX_CPU=GFX_CPU_CORTX_M? with no hardware floating point support but CORTEX_USE_FPU is GFXON. Try using GFX_CPU_GFX_CPU_CORTEX_M?_FP instead"
|
#warning "GOS Threads: You have specified GFX_CPU=GFX_CPU_CORTX_M? with no hardware floating point support but CORTEX_USE_FPU is GFXON. Try using GFX_CPU_GFX_CPU_CORTEX_M?_FP instead"
|
||||||
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
||||||
|
@ -5,6 +5,12 @@
|
|||||||
* http://ugfx.io/license.html
|
* http://ugfx.io/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file src/gos/gos_zepyhr.h
|
||||||
|
* @brief GOS - Operating System Support header file for Zephyr RTOS.
|
||||||
|
* Zephyr SDK 0.9.1
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _GOS_ZEPHYR_H
|
#ifndef _GOS_ZEPHYR_H
|
||||||
#define _GOS_ZEPHYR_H
|
#define _GOS_ZEPHYR_H
|
||||||
|
|
||||||
|
1760
src/gwin/gwin.h
1760
src/gwin/gwin.h
File diff suppressed because it is too large
Load Diff
@ -304,7 +304,7 @@ void gwinGraphDrawPoint(GHandle gh, gCoord x, gCoord y) {
|
|||||||
void gwinGraphDrawPoints(GHandle gh, const gPoint *points, unsigned count) {
|
void gwinGraphDrawPoints(GHandle gh, const gPoint *points, unsigned count) {
|
||||||
#define gg ((GGraphObject *)gh)
|
#define gg ((GGraphObject *)gh)
|
||||||
unsigned i;
|
unsigned i;
|
||||||
const gPoint *p;
|
const gPoint *p;
|
||||||
|
|
||||||
if (gh->vmt != &graphVMT || !_gwinDrawStart(gh))
|
if (gh->vmt != &graphVMT || !_gwinDrawStart(gh))
|
||||||
return;
|
return;
|
||||||
|
@ -108,7 +108,7 @@ typedef struct ListItem {
|
|||||||
* @brief Create a list widget
|
* @brief Create a list widget
|
||||||
*
|
*
|
||||||
* @note The drawing color and the background color get set to the current defaults. If you haven't called
|
* @note The drawing color and the background color get set to the current defaults. If you haven't called
|
||||||
* @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK.
|
* @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_BLACK and GFX_WHITE.
|
||||||
* @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then
|
* @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then
|
||||||
* there is no default font and text drawing operations will not display anything.
|
* there is no default font and text drawing operations will not display anything.
|
||||||
* @note A list remembers its normal drawing state. If there is a window manager then it is automatically
|
* @note A list remembers its normal drawing state. If there is a window manager then it is automatically
|
||||||
|
@ -12,3 +12,4 @@
|
|||||||
# NONE
|
# NONE
|
||||||
#
|
#
|
||||||
OPT_CPU = x86
|
OPT_CPU = x86
|
||||||
|
LIBS += gdi32
|
||||||
|
Loading…
Reference in New Issue
Block a user