My GPIOs in the overlay file are not defined in devicetree_generated.h, zephyr fails - nrf52

I am trying to use Zephyr (v.3.2.99) for a small application on the nRF52840 Dev Kit. I set up an overlay file nrf52840dk_nrf52840.overlay that is being read and processed by cmake. I get the devicetree_generated.h but it lacks the definition of the nodes.
Here is my overlay:
/ {
aliases {
pwr0 = &pinpwr0;
eu0 = &pineu0;
psw0 = &pinsw0;
};
pinpwr0: pin_pwr_0 {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "power";
};
pineu0: pin_eu_0 {
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
label = "eu";
};
pinsw0: pin_sw_0 {
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
label = "switch";
};
chosen {
nordic,nus-uart = &uart0;
};
};
My c file:
...
#define PWR_IO DT_ALIAS(pwr0)
#if DT_NODE_HAS_STATUS(PWR_IO, okay)
#define PWR_IO_PIN DT_GPIO_PIN(PWR_IO, gpios)
#else
#error "Cannot find the board"
#define PWR_IO_PIN 0
#endif
static const struct gpio_dt_spec pwr = GPIO_DT_SPEC_GET(PWR_IO, gpios);
...
The error:
zephyr/include/generated/devicetree_generated.h:701:32: error:
'DT_N_S_pin_pwr_0_P_gpios_IDX_0_VAL_pin' undeclared here (not in a
function); did you mean 'DT_N_S_leds_S_led_0_P_gpios_IDX_0_VAL_pin'?
701 | #define DT_N_ALIAS_pwr0 DT_N_S_pin_pwr_0
| ^~~~~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/devicetree.h:3901:9: note: in
definition of macro 'DT_CAT7' 3901 | a1 ## a2 ## a3 ## a4 ##
a5 ## a6 ## a7
| ^~ F:/ncs/v2.2.0/zephyr/include/zephyr/devicetree/gpio.h:164:9: note: in
expansion of macro 'DT_PHA_BY_IDX' 164 |
DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
| ^~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/drivers/gpio.h:341:24: note: in
expansion of macro 'DT_GPIO_PIN_BY_IDX' 341 | .pin =
DT_GPIO_PIN_BY_IDX(node_id, prop, idx),
| ^~~~~~~~~~~~~~~~~~ F:/ncs/v2.2.0/zephyr/include/zephyr/drivers/gpio.h:376:9: note: in
expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX' 376 |
GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~ ../src/tvunit.c:25:40: note: in expansion of macro 'GPIO_DT_SPEC_GET' 25 | static const struct
gpio_dt_spec pwr = GPIO_DT_SPEC_GET(PWR_IO, gpios);
If I look into the file devicetree_generated.h, the token DT_N_S_pin_pwr_0 is never defined (only referred to in the comments).
What am I doing wrong?

Zephyr's build system is not properly processing the pin_pwr_0 and like nodes as they don't have bindings. Generally, nodes in the devicetree also need bindings to be processed correctly. Since the nodes you are using are just pins/buttons; you should be able to use the generic gpio-keys compatible by adding this to each node: compatible = "gpio-keys"; More on Zephyr's devicetree binding rules can be found here: https://docs.zephyrproject.org/3.2.0/build/dts/bindings.html

Related

Problem compiling emacs 23.4.1 on Ubuntu 20.0.4.2 LTS

I followed the instructions in INSTALL for dependency installation and configuration. Then, after make, I get these errors:
In file included from ./config.h:1074,
from dispnew.c:21:
dispnew.c: In function ‘update_frame_1’:
./s/gnu-linux.h:164:10: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pptr’
164 | ((FILE)->_pptr - (FILE)->_pbase)
| ^~
dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’
89 | #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’
5384 | int outq = PENDING_OUTPUT_COUNT (display_output);
| ^~~~~~~~~~~~~~~~~~~~
./s/gnu-linux.h:164:26: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_pbase’
164 | ((FILE)->_pptr - (FILE)->_pbase)
| ^~
dispnew.c:89:30: note: in expansion of macro ‘GNU_LIBRARY_PENDING_OUTPUT_COUNT’
89 | #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dispnew.c:5384:16: note: in expansion of macro ‘PENDING_OUTPUT_COUNT’
5384 | int outq = PENDING_OUTPUT_COUNT (display_output);
How do I get past these errors?

GNU ASM .section directive not working/linker issue

I'm trying to move my _start function to 0x0, as it is the bootloader.
Flash ROM exists from 0x0 to the first 128MB (=1Gb), other memory is DDR3 RAM but we will map RAM to 0x80000000 to 0xFFFFFFFF.
The issue is with the directive .section ".vect", the _start address is not going into the .vect section, it is going into the .text section.
_start:
.section ".vect" /* I've tried .section .vect and I've tried moving above _start */
b ResetHandler
b UndefHandler
b SVC_Handler
b PrefetchAbortHandler
b DataAbortHandler
b NotUsedHandler
b IRQ_Handler
b FIQ_Handler
1:
b 1b /* Hang and don't return */
In my linker script, the MEMORY command and then the start of SECTIONS is:
MEMORY
{
vect (rx) : o = 0x0, l = 1M
rom (rx) : o = 1M, l = 127M
ram (wx) : o = 0x80000000, l = 0x80000000
}
SECTIONS
{
.vect : ALIGN(64)
{
. = 0x0;
*(.vect*)
VectTableEnd = .;
VectTableSize = SIZEOF(.vect);
} > vect
.... (.text, .bss, .data, .stack, etc are other SECTIONS entries)
}
But no matter what, the _start assembly function code gets shoved into the standard .text section, not at address 0x0. Does anyone know what I'm going wrong?
The code is targetted at bare-metal ARMv7A machines, compiled/linked with arm-none-eabi-as/ld
Cheers.
No surprises here if your _start label ends up in .text:
/* implicitly default section .text */
_start:
/* still the same section .text */
.section .vect
/* explicitly the section .vect */
b ResetHandler
You probably want to switch the section before defining the _start label to make that label end up in the intended section.
/* implicitly default section .text */
.section .vect
/* explicitly the section .vect */
_start:
b ResetHandler
Using the name _start as the symbol for a vector table is a bit weird (I would have expected a symbol like __vectors or vector_table), but that is beyond the scope of this question.

targets/stm32f1x.cfg:74: Error: target requires -dap parameter instead of -chain-position! OpenOCD

I am using OpenOCD to flash code into a black-pill (STM32f103). It worked a week ago but after updating ubuntu (it's the only thing I can think of that changed) it gives me an error when flashing the code.
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
targets/stm32f1x.cfg:74: Error: target requires -dap parameter instead of -chain-position!
in procedure 'script'
at file "embedded:startup.tcl", line 26
at file "black_pill.cfg", line 24
at file "targets/stm32f1x.cfg", line 74
The stm32f1x.cfg file content:
# script for stm32f1x family
#
# stm32 devices support both JTAG and SWD transports.
#
source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME stm32f1x
}
set _ENDIAN little
# Work-area is a space in RAM used for flash programming
# By default use 4kB (as found on some STM32F100s)
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x1000
}
#jtag scan chain
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
if { [using_jtag] } {
# See STM Document RM0008 Section 26.6.3
set _CPUTAPID 0x3ba00477
} {
# this is the SW-DP tap id not the jtag tap id
set _CPUTAPID 0x1ba01477
}
}
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if { [info exists BSTAPID] } {
# FIXME this never gets used to override defaults...
set _BSTAPID $BSTAPID
} else {
# See STM Document RM0008
# Section 29.6.2
# Low density devices, Rev A
set _BSTAPID1 0x06412041
# Medium density devices, Rev A
set _BSTAPID2 0x06410041
# Medium density devices, Rev B and Rev Z
set _BSTAPID3 0x16410041
set _BSTAPID4 0x06420041
# High density devices, Rev A
set _BSTAPID5 0x06414041
# Connectivity line devices, Rev A and Rev Z
set _BSTAPID6 0x06418041
# XL line devices, Rev A
set _BSTAPID7 0x06430041
# VL line devices, Rev A and Z In medium-density and high-density value line devices
set _BSTAPID8 0x06420041
# VL line devices, Rev A
set _BSTAPID9 0x06428041
}
if {[using_jtag]} {
swj_newdap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \
-expected-id $_BSTAPID6 -expected-id $_BSTAPID7 \
-expected-id $_BSTAPID8 -expected-id $_BSTAPID9
}
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
adapter_khz 1000
adapter_nsrst_delay 100
if {[using_jtag]} {
jtag_ntrst_delay 100
}
reset_config srst_nogate
if {![using_hla]} {
# if srst is not fitted use SYSRESETREQ to
# perform a soft reset
cortex_m reset_config sysresetreq
}
$_TARGETNAME configure -event examine-end {
# DBGMCU_CR |= DBG_WWDG_STOP | DBG_IWDG_STOP |
# DBG_STANDBY | DBG_STOP | DBG_SLEEP
mmw 0xE0042004 0x00000307 0
}
$_TARGETNAME configure -event trace-config {
# Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
# change this value accordingly to configure trace pins
# assignment
mmw 0xE0042004 0x00000020 0
}
I've tried changing the -chain-position for -dap but as I don't understand what I am doing it doesn't work.
Any help helping me understand this error would be highly appreciated.
Since version 0.11.0 OpenOCD doesn't create the DAP(Debug Access Point) isn't automatically created. Change the line for:
dap create dap_name -chain-position $_TARGETNAME
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap dap_name
For more information:
https://openocd.org/doc/html/TAP-Declaration.html#dapdeclaration

Interfacing TFT screen with STM32F446 using display bus interface

I'm trying to understand how to interface a TFT screen module with an STM32F4 chip on a custom PCB.
Here is the module and its basic info.
To write commands and data to the screen, the ILI9481 driver on the screen module uses the Display Bus Interface (DBI), where data is sent over 8 or 16 bits through data wires.
Looking at library examples, I understand (and please correct me, if I am wrong), that in order to send a command of one byte, it simply sets the digital pins of the chip high or low, depending on the command. For example, command 0x2 in 8bit communication would be 00000010, where 0 would be the digital low on the chips GPIO pin and 1 would be digital high, meaning 1 of 8 wires are active (logical high). I Hope, I understand this correctly.
Now as I looked over examples, usually these digital pins are on the same GPIO port. And if I understand correctly, GPIO ports have a register, called BSRR, where you can manipulate the logical levels of the pins of the GPIO port. If the data pins are all on the same GPIO port, I assume this would work (from the example, where c is the command byte):
void STM32_TFT_8bit::write8(uint8_t c) {
// BRR or BSRR avoid read, mask write cycle time
// BSRR is 32 bits wide. 1's in the most significant 16 bits signify pins to reset (clear)
// 1's in least significant 16 bits signify pins to set high. 0's mean 'do nothing'
TFT_DATA->regs->BSRR = ((~c)<<16) | (c); //Set pins to the 8 bit number
WR_STROBE;
}
However, on my PCB board, the data pins of the screen module are separated on different ports.
So, my question is, how would I do the same thing, send a command while manipulating the logical levels? I assume, that I could write set/reset my pins one by one, depending on the command, but how would it look with the BSRR registers?
If my data pins are as follows:
D0 -> PC12
D1 -> PC11
D2 -> PC10
D4 -> PA12
D5 -> PA11
D6 -> PA10
D7 -> PA9
Would a command of 0x9D (0b10011101) through the registers would look something like this? :
GPIOA->regs->BSRR = 0b0001101000000000; // A port: turn on PA9, PA11, PA12
GPIOC->regs->BSRR = 0b0001010000000000; // C port: turn on PC10 and PC12
how would it look with the BSRR registers?
A bitmask can be applied to the value that is written to the BSRR, for example like this:
/* set/reset selected GPIO output pins, ignore the rest */
static inline void _gpio_write(GPIO_TypeDef* GPIOx, uint16_t state, uint16_t mask)
{
GPIOx->BSRR = ((uint32_t)(~state & mask) << 16) | (state & mask);
}
The data bits need to be rearranged before writing them to the GPIO output registers, for example like this:
#define BITS(w,b) (((w) & (1 << (b))) >> (b))
/* write a data/command byte to the data bus DB[7:0] of custom ILI9481 board
used pin assignment: D0 -> PC12, D1 -> PC11, D2 -> PC10, (D3 -> PC1) (?)
D4 -> PA12, D5 -> PA11, D6 -> PA10, D7 -> PA9 */
static void _write_data_to_pins(uint8_t data)
{
const uint16_t mask_c = 1<<12 | 1<<11 | 1<<10 | 1<<1; /* 0x1c02 */
const uint16_t mask_a = 1<<12 | 1<<11 | 1<<10 | 1<<9; /* 0x1e00 */
_gpio_write(GPIOC, (uint16_t)(BITS(data, 0) << 12 | BITS(data, 1) << 11 |
BITS(data, 2) << 10 | BITS(data, 3) << 1), mask_c);
_gpio_write(GPIOA, (uint16_t)(BITS(data, 4) << 12 | BITS(data, 5) << 11 |
BITS(data, 6) << 10 | BITS(data, 7) << 9), mask_a);
}
Test:
/* just for testing: read the written data bits back and arrange them in a byte */
static uint8_t _read_data_from_pins(void)
{
const uint32_t reg_c = GPIOC->ODR;
const uint32_t reg_a = GPIOA->ODR;
return (uint8_t)(BITS(reg_c, 12) << 0 | BITS(reg_c, 11) << 1 |
BITS(reg_c, 10) << 2 | BITS(reg_c, 1) << 3 |
BITS(reg_a, 12) << 4 | BITS(reg_a, 11) << 5 |
BITS(reg_a, 10) << 6 | BITS(reg_a, 9) << 7);
}
/* somewhere in main loop of test project */
{
uint8_t d = 0xff;
do {
_write_data_to_pins(d);
if (d != _read_data_from_pins()) {
Error_Handler();
}
} while (d--);
}
(Note: Only 7 of the 8 data pins DB[7:0] were listed in the question, PC1 was assigned to data pin D3 here.)
(Note: Most of these bit-shifts can be easily optimized out by the compiler, use at least -O1 to get somewhat compact results with GCC.)
GPIOA->regs->BSRR = 0b0001101000000000; // A port: turn on PA9, PA11, PA12
GPIOC->regs->BSRR = 0b0001010000000000; // C port: turn on PC10 and PC12
These two code lines do what is stated in the comments. But they will leave all the other pins unchanged.
The resulting output will depend on the previous state of the output data register. - For the LOW data pins, the corresponding GPIO port bits in BSRR[31:16] need to be set to 1 in order to update all the 8-bit data bus lines at once.
To answer the actual question:
No, the output on the data bus will not be 0x9D (0b1001'1101) after writing the two quoted bit patterns to the two BSRR registers. - In my case, it would look like this (please correct me if I'm wrong):
/* write 0x9D (0b1001'1101) to the data bus
used pin assignment: D0 -> PC12, D1 -> PC11, D2 -> PC10, (D3 -> PC1) (?)
D4 -> PA12, D5 -> PA11, D6 -> PA10, D7 -> PA9 */
GPIOC->BSRR = 0x8001402; /* = 0b00001000'00000000'00010100'00000010 */
GPIOA->BSRR = 0xc001200; /* = 0b00001100'00000000'00010010'00000000 */
Suppose 'command' is the byte to send (I hope there is a strobe somewhere...).
I would simply make 8 lines of code like this (If I well understand the port registers of the STM32):
if (command & 1) GPIOC->BSRR |= 1 << 12; else GPIOC->BSRR &= ~(1 << 12);
if (command & 2) GPIOC->BSRR |= 1 << 11; else GPIOC->BSRR &= ~(1 << 11);
...
if (command & 128) GPIOA->BSRR |= 1 << 9; else GPIOA->BSRR &= ~(1 << 9);
Maybe this is quite raw, but it works and it is easy to understand (i.e. more difficult to make typos). Next time tell the hardware designer to arrange wires just a little better... it is hard to think at something worse than this, the bits seem reversed just to see if the software guy can cope with them!

Can you have cell specific background colors in the table-plus macro on Confluence?

I am using this table-plus macro with Confluence:
http://confluence.atlassian.com/display/CONFEXT/Table-plus+macro
Can I have cell level formatting? I only see column level formatting.
How to do this all depends on what plugins you have obtained and enabled. The built-in table cell syntax, while concise, has nowhere to put such customization. You may want to look at Adaptavist's plugin for Content Formatting Macros, especially the table macro -- you can throw bgcolor attributes on the cells with no problem.
Of course, after a point, it starts to look a lot like html, in which case you may just want to enable the HTML plugin that ships with Confluence, but you should first be aware of the security implications of doing so; it may not be appropriate for your environment.
You can apply a style to the table, table row or table cell using {html} or user defined macro.
Here are three macros for setting the background colour for a table cell, table row or the whole table.
Table Cell Background Colour macro
## Macro Title: tblcellbg
## Macro Description: Set background colour for a single table cell
## Macro has a body: N
## Categories: Formatting
## Body Processing: No body
## Output Format: HTML
## Output: JavaScript. Sets table cell background color via CSS
## Developed By: Underverse (http://stackoverflow.com/users/2093966/underverse)
## License: BY-NC-SA
## #param bgcolour:title=Background Color|type=string|required=true|desc=HTML colour or a HTML numeric #value
##
## Check for a blank first parameter
##
#if ($parambgcolour && $parambgcolour.length() > 0) ## If a parm name was used
#set ($bgcolor = $parambgcolour) ## then set the value locally
#elseif ($param0 && $param0.length() > 0) ## if no parm name
#set ($bgcolor = $param0) ## then use the first value
#else
#set ($bgcolor = "#DDFADE") ## no value so set a default
#end
#if ($bgcolor.contains('#')) ## For HTML colours #etc
#set ($bgcolorclass = $bgcolor.replaceAll('#', 'A')) ## Substritute any other char
#else
#set ($bgcolorclass = $bgcolor) ## or use the colourname itself
#end
<script type="text/javascript" class="$bgcolorclass$bgcolorclass">
AJS.$(document).ready(function() {
AJS.$(".$bgcolorclass$bgcolorclass").closest("td").css({"background-color": "$bgcolor"});
});
</script>
You can then use this macro in a wiki markup table, wiki macro table or into the wiki editor to set the background colour of the table cell.
|| Heading 1|| Heading 2 || Heading 3 |
| {tblcellbg:lightgreen} Apple | {tblcellbg:#FFFF33} Banana | Pear |
Table Row Background Colour macro
## Macro Title: tblrowbg
## Macro Description: Set background colour for a table row
## Macro has a body: N
## Categories: Formatting
## Body Processing: No body
## Output Format: HTML
## Output: JavaScript. Sets table row background color via CSS
## Developed By: Underverse (http://stackoverflow.com/users/2093966/underverse)
## License: BY-NC-SA
## #param bgcolour:title=Background Color|type=string|required=true|desc=HTML colour or a HTML numeric #value
##
##
## Check for a blank first parameter
##
#if ($parambgcolour && $parambgcolour.length() > 0) ## If a parm name was used
#set ($bgcolor = $parambgcolour) ## then set the value locally
#elseif ($param0 && $param0.length() > 0) ## if no parm name
#set ($bgcolor = $param0) ## then use the first value
#else
#set ($bgcolor = "#DDFADE") ## no value so set a default
#end
#if ($bgcolor.contains('#')) ## For HTML colours #etc
#set ($bgcolorclass = $bgcolor.replaceAll('#', 'A')) ## Substritute any other char
#else
#set ($bgcolorclass = $bgcolor) ## or use the colourname itself
#end
<script type="text/javascript" class="$bgcolorclass$bgcolorclass">
AJS.$(document).ready(function() {
AJS.$(".$bgcolorclass$bgcolorclass").closest("tr").css({"background-color": "$bgcolor"});
});
</script>
Put the macro in one of the cells in the row to be set.
|| Heading 1|| Heading 2 || Heading 3 |
| {tblrowbg:lightblue} Apple | Banana | Pear |
Use this macro with {tblcellbg} for finer control of cell colours.
|| Heading 1|| Heading 2 || Heading 3 |
| {tblrowbg:lightblue} Apple | {tblcellbg:#FFFF33} Banana | Pear |
Table Background Colour macro
## Macro Title: tblbg
## Macro Description: Set background colour for a table
## Macro has a body: N
## Categories: Formatting
## Body Processing: No body
## Output Format: HTML
## Output: JavaScript. Sets table background color via CSS
## Developed By: Underverse (http://stackoverflow.com/users/2093966/underverse)
## License: BY-NC-SA
## #param bgcolour:title=Background Color|type=string|required=true|desc=HTML colour or a HTML numeric #value
##
##
## Check for a blank first parameter
##
#if ($parambgcolour && $parambgcolour.length() > 0) ## If a parm name was used
#set ($bgcolor = $parambgcolour) ## then set the value locally
#elseif ($param0 && $param0.length() > 0) ## if no parm name
#set ($bgcolor = $param0) ## then use the first value
#else
#set ($bgcolor = "#DDFADE") ## no value so set a default
#end
#if ($bgcolor.contains('#')) ## For HTML colours #etc
#set ($bgcolorclass = $bgcolor.replaceAll('#', 'A')) ## Substritute any other char
#else
#set ($bgcolorclass = $bgcolor) ## or use the colourname itself
#end
<script type="text/javascript" class="$bgcolorclass$bgcolorclass">
AJS.$(document).ready(function() {
AJS.$(".$bgcolorclass$bgcolorclass").closest("table").css({"background-color": "$bgcolor"});
});
</script>
Put the macro in one of the cells in the table.
|| {tblbg:lightblue} Heading 1|| Heading 2 || Heading 3 |
| Apple | Banana | Pear |
Can be used with {tblrowbg} and {tblcellbg}.
JavaScript
Alternatively, wrap the javascript which sets the cell/row/table background colour {html} and put it into the table as code.
JS Table Cell BG Colour
|| Heading 1|| Heading 2 || Heading 3 |
| Apple |{html}<SCRIPT class=AFFFF33AFFFF33 type=text/javascript>
AJS.$(document).ready(function() {
AJS.$(".AFFFF33AFFFF33").closest("td").css({"background-color": "#FFFF33"});
}); </SCRIPT> {html} Banana | Pear |
JS Table Row BG Color
|| Heading 1|| Heading 2 || Heading 3 |
| {html}<SCRIPT class=lightbluelightblue type=text/javascript>
AJS.$(document).ready(function() {
AJS.$(".lightbluelightblue").closest("tr").css({"background-color": "lightblue"});
});
</SCRIPT>{html} Apple | Banana | Pear |
JS Table BG Color
|| {html}<SCRIPT class=pinkpink type=text/javascript>
AJS.$(document).ready(function() {
AJS.$(".pinkpink").closest("table").css({"background-color": "pink"});
});
</SCRIPT>{html} Heading 1|| Heading 2 || Heading 3 |
| Apple | Banana | Pear |
It is not possible to do this with the {table-plus} macro. However, you can do it in Confluence with a more advanced table formatting plugin as described by Zac.