Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - firmware.c

Pages: [1] 2
1
AVR and Arduino / Pointer to array of pointer
« on: June 14, 2018, 09:18:52 pm »
ห่างหายจากการ post ลงเว็บบอร์ดไปซะนาน พอดีวันนี้ผมมีงานที่จำเป็นจะต้องใช้ Pointer to array of pointer ซึ่งตอนแรกก็ไม่คิดว่าจะต้องใช้มัน เลยอยากเอามาแชร์เผื่อมีใครจำเป็นต้องนำไปใช้หรือนึกไม่ออกว่าทำไมต้องใช้มัน

ตามปกติโดยทั่งไปแล้วหากเราต้องการอ่านค่าจาก array of pointer ก็สามารถทำได้ง่ายๆจาก code ด้านล่าง

Code: [Select]
const unsigned char *pTable1[] = {
&data4,
&data3,
&data2,
&data1,
};
const unsigned char *pTable2[] = {
&data10,
&data9,
&data8,
&data7,
&data6,
&data5,
};

TestRead = *pTable1[0];

TestRead = *pTable2[0];

แต่ปัญหาของผมก็คือผมจำเป็นที่จะต้องทำให้ code ในการอ่านค่าจาก array of pointer ของ pTable1 และ pTable2 นั้น common กันโดยเลือกจากตัวแปรว่าจะอ่านค่าจาก pTable1 หรือ pTable2

พยายามอยู่นานจึงนึกออกขึ้นว่าน่าจะต้องใช้ Pointer to array of pointer ซึง code สำหรับทดสอบก็ตามด้านล่างครับ

Code: [Select]
// Test pointer to array of pointer by firmware.c

#include <avr/io.h>

unsigned char data1 = 1;
unsigned char data2 = 2;
unsigned char data3 = 3;
unsigned char data4 = 4;

unsigned char data5 = 5;
unsigned char data6 = 6;
unsigned char data7 = 7;
unsigned char data8 = 8;
unsigned char data9 = 9;
unsigned char data10 = 10;

const unsigned char *pTable1[] = {
&data4,
&data3,
&data2,
&data1,
};
const unsigned char *pTable2[] = {
&data10,
&data9,
&data8,
&data7,
&data6,
&data5,
};
unsigned char SelectTable;
unsigned char TestRead;
unsigned char ReadCount;

unsigned char **LpSelectTable; // pointer to array of pointer
unsigned char Counter;

int main(void)
{


    while(1)
    {
if (SelectTable == 0) {
LpSelectTable = (unsigned char **)&pTable1;
ReadCount = sizeof(pTable1)/sizeof(pTable1[0]);
} else {
LpSelectTable = (unsigned char **)&pTable2;
ReadCount = sizeof(pTable2)/sizeof(pTable2[0]);
}

                // common code area to read array of pointer pTable1 or pTable2
Counter = 0;
do {
TestRead = **(LpSelectTable+Counter);
PORTB = TestRead;
} while (++Counter < ReadCount);
    }
}

2
รายละเอียดตาม link ครับ

http://www.jobtopgun.com/StartSearch?idEmp=18261

หน้าที่และความรับผิดชอบ
• Software document design follow as specification requirement
• Implement coding microcontroller firmware by using Embedded C language
• Debugging test and document report
• Cooperate with Hardware engineer and Functional engineer team
• Maintain firmware for future modification
คุณสมบัติ
• Bachelor's Degree in Electronics/Electrical/Mechatronics engineering or related field
• 3-5 Year experience in Firmware design
• Knowledge in microcontroller architecture and peripheral module (UART/I2C/SPI etc.)
• Understand on Embedded software development process
• Must be understand on Embedded C programming for Microcontroller
• Familiar with Embedded software development tools (ICE, JTAG, Embedded C compiler, etc.)
• Understand on microcontroller interface circuit



3
AVR and Arduino / Update iobit.h
« on: June 10, 2015, 10:55:00 pm »
Code: [Select]
/*******************************************************************************
* Module name: iobit.h
*
* Copyright (C) 2009,2015 firmware.c@Electoday.
* All right reserved.
*
* The iobit for AVR is a free software and there is NO WARRANTY.
* No restriction on use. You can use, modify and redistribute it for
* personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
* Redistributions of source code must retain the above copyright notice.
*
* Example to use:
* if (ioPINB0)
* ioPORTA0 = 1;
* if (ioPINB1)
* ioPORTA1 ^= 1;
*
* History:
* 24/07/09
*  + First written.
* 06/04/15
*  + Add more IO suppot ATMEGA640/1280/2560
*
********************************************************************************
* Include Section
********************************************************************************/
#ifndef _AVR_IO_BIT_H_INCLUDED   
#define _AVR_IO_BIT_H_INCLUDED

#include <avr/io.h>

/*******************************************************************************
* Defines Section
********************************************************************************
* Struct Definition
*/
typedef struct {
unsigned char b0:1;
unsigned char b1:1;
unsigned char b2:1;
unsigned char b3:1;
unsigned char b4:1;
unsigned char b5:1;
unsigned char b6:1;
unsigned char b7:1;
} bit_field;

/*
 * Union Definition
 */
typedef union {
unsigned char byte;
bit_field bit;
} io_reg;

#define __O volatile io_reg * const
#define __I const volatile io_reg * const

#if defined (PORTA) 
#define     ioDDRA ((__O)&DDRA)->byte
#define     ioPORTA ((__O)&PORTA)->byte
#define     ioPINA ((__I)&PINA)->byte
#if defined (PA0)
#define ioDDRA0 ((__O)&DDRA)->bit.b0
#define ioPORTA0 ((__O)&PORTA)->bit.b0
#define ioPINA0 ((__I)&PINA)->bit.b0
#endif
#if defined (PA1)
#define ioDDRA1 ((__O)&DDRA)->bit.b1
#define ioPORTA1 ((__O)&PORTA)->bit.b1
#define ioPINA1 ((__I)&PINA)->bit.b1
#endif
#if defined (PA2)
#define ioDDRA2 ((__O)&DDRA)->bit.b2
#define ioPORTA2 ((__O)&PORTA)->bit.b2
#define ioPINA2 ((__I)&PINA)->bit.b2
#endif
#if defined (PA3)
#define ioDDRA3 ((__O)&DDRA)->bit.b3
#define ioPORTA3 ((__O)&PORTA)->bit.b3
#define ioPINA3 ((__I)&PINA)->bit.b3
#endif
#if defined (PA4)
#define ioDDRA4 ((__O)&DDRA)->bit.b4
#define ioPORTA4 ((__O)&PORTA)->bit.b4
#define ioPINA4 ((__I)&PINA)->bit.b4
#endif
#if defined (PA5)
#define ioDDRA5 ((__O)&DDRA)->bit.b5
#define ioPORTA5 ((__O)&PORTA)->bit.b5
#define ioPINA5 ((__I)&PINA)->bit.b5
#endif
#if defined (PA6)
#define ioDDRA6 ((__O)&DDRA)->bit.b6
#define ioPORTA6 ((__O)&PORTA)->bit.b6
#define ioPINA6 ((__I)&PINA)->bit.b6
#endif
#if defined (PA7)
#define ioDDRA7 ((__O)&DDRA)->bit.b7
#define ioPORTA7 ((__O)&PORTA)->bit.b7
#define ioPINA7 ((__I)&PINA)->bit.b7
#endif
#endif

#if defined (PORTB) 
#define     ioDDRB ((__O)&DDRB)->byte
#define     ioPORTB ((__O)&PORTB)->byte
#define     ioPINB ((__I)&PINB)->byte
#if defined (PB0)
#define ioDDRB0 ((__O)&DDRB)->bit.b0
#define ioPORTB0 ((__O)&PORTB)->bit.b0
#define ioPINB0 ((__I)&PINB)->bit.b0
#endif
#if defined (PB1)
#define ioDDRB1 ((__O)&DDRB)->bit.b1
#define ioPORTB1 ((__O)&PORTB)->bit.b1
#define ioPINB1 ((__I)&PINB)->bit.b1
#endif
#if defined (PB2)
#define ioDDRB2 ((__O)&DDRB)->bit.b2
#define ioPORTB2 ((__O)&PORTB)->bit.b2
#define ioPINB2 ((__I)&PINB)->bit.b2
#endif
#if defined (PB3)
#define ioDDRB3 ((__O)&DDRB)->bit.b3
#define ioPORTB3 ((__O)&PORTB)->bit.b3
#define ioPINB3 ((__I)&PINB)->bit.b3
#endif
#if defined (PB4)
#define ioDDRB4 ((__O)&DDRB)->bit.b4
#define ioPORTB4 ((__O)&PORTB)->bit.b4
#define ioPINB4 ((__I)&PINB)->bit.b4
#endif
#if defined (PB5)
#define ioDDRB5 ((__O)&DDRB)->bit.b5
#define ioPORTB5 ((__O)&PORTB)->bit.b5
#define ioPINB5 ((__I)&PINB)->bit.b5
#endif
#if defined (PB6)
#define ioDDRB6 ((__O)&DDRB)->bit.b6
#define ioPORTB6 ((__O)&PORTB)->bit.b6
#define ioPINB6 ((__I)&PINB)->bit.b6
#endif
#if defined (PB7)
#define ioDDRB7 ((__O)&DDRB)->bit.b7
#define ioPORTB7 ((__O)&PORTB)->bit.b7
#define ioPINB7 ((__I)&PINB)->bit.b7
#endif
#endif


#if defined (PORTC) 
#define     ioDDRC ((__O)&DDRC)->byte
#define     ioPORTC ((__O)&PORTC)->byte
#define     ioPINC ((__I)&PINC)->byte
#if defined (PC0)
#define ioDDRC0 ((__O)&DDRC)->bit.b0
#define ioPORTC0 ((__O)&PORTC)->bit.b0
#define ioPINC0 ((__I)&PINC)->bit.b0
#endif
#if defined (PC1)
#define ioDDRC1 ((__O)&DDRC)->bit.b1
#define ioPORTC1 ((__O)&PORTC)->bit.b1
#define ioPINC1 ((__I)&PINC)->bit.b1
#endif
#if defined (PC2)
#define ioDDRC2 ((__O)&DDRC)->bit.b2
#define ioPORTC2 ((__O)&PORTC)->bit.b2
#define ioPINC2 ((__I)&PINC)->bit.b2
#endif
#if defined (PC3)
#define ioDDRC3 ((__O)&DDRC)->bit.b3
#define ioPORTC3 ((__O)&PORTC)->bit.b3
#define ioPINC3 ((__I)&PINC)->bit.b3
#endif
#if defined (PC4)
#define ioDDRC4 ((__O)&DDRC)->bit.b4
#define ioPORTC4 ((__O)&PORTC)->bit.b4
#define ioPINC4 ((__I)&PINC)->bit.b4
#endif
#if defined (PC5)
#define ioDDRC5 ((__O)&DDRC)->bit.b5
#define ioPORTC5 ((__O)&PORTC)->bit.b5
#define ioPINC5 ((__I)&PINC)->bit.b5
#endif
#if defined (PC6)
#define ioDDRC6 ((__O)&DDRC)->bit.b6
#define ioPORTC6 ((__O)&PORTC)->bit.b6
#define ioPINC6 ((__I)&PINC)->bit.b6
#endif
#if defined (PC7)
#define ioDDRC7 ((__O)&DDRC)->bit.b7
#define ioPORTC7 ((__O)&PORTC)->bit.b7
#define ioPINC7 ((__I)&PINC)->bit.b7
#endif
#endif


#if defined (PORTD) 
#define     ioDDRD ((__O)&DDRD)->byte
#define     ioPORTD ((__O)&PORTD)->byte
#define     ioPIND ((__I)&PIND)->byte
#if defined (PD0)
#define ioDDRD0 ((__O)&DDRD)->bit.b0
#define ioPORTD0 ((__O)&PORTD)->bit.b0
#define ioPIND0 ((__I)&PIND)->bit.b0
#endif
#if defined (PD1)
#define ioDDRD1 ((__O)&DDRD)->bit.b1
#define ioPORTD1 ((__O)&PORTD)->bit.b1
#define ioPIND1 ((__I)&PIND)->bit.b1
#endif
#if defined (PD2)
#define ioDDRD2 ((__O)&DDRD)->bit.b2
#define ioPORTD2 ((__O)&PORTD)->bit.b2
#define ioPIND2 ((__I)&PIND)->bit.b2
#endif
#if defined (PD3)
#define ioDDRD3 ((__O)&DDRD)->bit.b3
#define ioPORTD3 ((__O)&PORTD)->bit.b3
#define ioPIND3 ((__I)&PIND)->bit.b3
#endif
#if defined (PD4)
#define ioDDRD4 ((__O)&DDRC)->bit.b4
#define ioPORTD4 ((__O)&PORTD)->bit.b4
#define ioPIND4 ((__I)&PIND)->bit.b4
#endif
#if defined (PD5)
#define ioDDRD5 ((__O)&DDRD)->bit.b5
#define ioPORTD5 ((__O)&PORTD)->bit.b5
#define ioPIND5 ((__I)&PIND)->bit.b5
#endif
#if defined (PD6)
#define ioDDRD6 ((__O)&DDRD)->bit.b6
#define ioPORTD6 ((__O)&PORTD)->bit.b6
#define ioPIND6 ((__I)&PIND)->bit.b6
#endif
#if defined (PD7)
#define ioDDRD7 ((__O)&DDRD)->bit.b7
#define ioPORTD7 ((__O)&PORTD)->bit.b7
#define ioPIND7 ((__I)&PIND)->bit.b7
#endif
#endif


#if defined (PORTE) 
#define     ioDDRE ((__O)&DDRE)->byte
#define     ioPORTE ((__O)&PORTE)->byte
#define     ioPINE ((__I)&PINE)->byte
#if defined (PE0)
#define ioDDRE0 ((__O)&DDRE)->bit.b0
#define ioPORTE0 ((__O)&PORTE)->bit.b0
#define ioPINE0 ((__I)&PINE)->bit.b0
#endif
#if defined (PE1)
#define ioDDRE1 ((__O)&DDRE)->bit.b1
#define ioPORTE1 ((__O)&PORTE)->bit.b1
#define ioPINE1 ((__I)&PINE)->bit.b1
#endif
#if defined (PE2)
#define ioDDRE2 ((__O)&DDRE)->bit.b2
#define ioPORTE2 ((__O)&PORTE)->bit.b2
#define ioPINE2 ((__I)&PINE)->bit.b2
#endif
#if defined (PE3)
#define ioDDRE3 ((__O)&DDRE)->bit.b3
#define ioPORTE3 ((__O)&PORTE)->bit.b3
#define ioPINE3 ((__I)&PINE)->bit.b3
#endif
#if defined (PE4)
#define ioDDRE4 ((__O)&DDRE)->bit.b4
#define ioPORTE4 ((__O)&PORTE)->bit.b4
#define ioPINE4 ((__I)&PINE)->bit.b4
#endif
#if defined (PE5)
#define ioDDRE5 ((__O)&DDRE)->bit.b5
#define ioPORTE5 ((__O)&PORTE)->bit.b5
#define ioPINE5 ((__I)&PINE)->bit.b5
#endif
#if defined (PE6)
#define ioDDRE6 ((__O)&DDRE)->bit.b6
#define ioPORTE6 ((__O)&PORTE)->bit.b6
#define ioPINE6 ((__I)&PINE)->bit.b6
#endif
#if defined (PE7)
#define ioDDRE7 ((__O)&DDRE)->bit.b7
#define ioPORTE7 ((__O)&PORTE)->bit.b7
#define ioPINE7 ((__I)&PINE)->bit.b7
#endif
#endif


#if defined (PORTF) 
#define     ioDDRF ((__O)&DDRF)->byte
#define     ioPORTF ((__O)&PORTF)->byte
#define     ioPINF ((__I)&PINF)->byte
#if defined (PF0)
#define ioDDRF0 ((__O)&DDRF)->bit.b0
#define ioPORTF0 ((__O)&PORTF)->bit.b0
#define ioPINF0 ((__I)&PINF)->bit.b0
#endif
#if defined (PF1)
#define ioDDRF1 ((__O)&DDRF)->bit.b1
#define ioPORTF1 ((__O)&PORTF)->bit.b1
#define ioPINF1 ((__I)&PINF)->bit.b1
#endif
#if defined (PF2)
#define ioDDRF2 ((__O)&DDRF)->bit.b2
#define ioPORTF2 ((__O)&PORTF)->bit.b2
#define ioPINF2 ((__I)&PINF)->bit.b2
#endif
#if defined (PF3)
#define ioDDRF3 ((__O)&DDRF)->bit.b3
#define ioPORTF3 ((__O)&PORTF)->bit.b3
#define ioPINF3 ((__I)&PINF)->bit.b3
#endif
#if defined (PF4)
#define ioDDRF4 ((__O)&DDRF)->bit.b4
#define ioPORTF4 ((__O)&PORTF)->bit.b4
#define ioPINF4 ((__I)&PINF)->bit.b4
#endif
#if defined (PF5)
#define ioDDRF5 ((__O)&DDRF)->bit.b5
#define ioPORTF5 ((__O)&PORTF)->bit.b5
#define ioPINF5 ((__I)&PINF)->bit.b5
#endif
#if defined (PF6)
#define ioDDRF6 ((__O)&DDRF)->bit.b6
#define ioPORTF6 ((__O)&PORTF)->bit.b6
#define ioPINF6 ((__I)&PINF)->bit.b6
#endif
#if defined (PF7)
#define ioDDRF7 ((__O)&DDRF)->bit.b7
#define ioPORTF7 ((__O)&PORTF)->bit.b7
#define ioPINF7 ((__I)&PINF)->bit.b7
#endif
#endif


#if defined (PORTG) 
#define     ioDDRG ((__O)&DDRG)->byte
#define     ioPORTG ((__O)&PORTG)->byte
#define     ioPING ((__I)&PING)->byte
#if defined (PG0)
#define ioDDRG0 ((__O)&DDRG)->bit.b0
#define ioPORTG0 ((__O)&PORTG)->bit.b0
#define ioPING0 ((__I)&PING)->bit.b0
#endif
#if defined (PG1)
#define ioDDRG1 ((__O)&DDRG)->bit.b1
#define ioPORTG1 ((__O)&PORTG)->bit.b1
#define ioPING1 ((__I)&PING)->bit.b1
#endif
#if defined (PG2)
#define ioDDRG2 ((__O)&DDRG)->bit.b2
#define ioPORTG2 ((__O)&PORTG)->bit.b2
#define ioPING2 ((__I)&PING)->bit.b2
#endif
#if defined (PG3)
#define ioDDRG3 ((__O)&DDRG)->bit.b3
#define ioPORTG3 ((__O)&PORTG)->bit.b3
#define ioPING3 ((__I)&PING)->bit.b3
#endif
#if defined (PG4)
#define ioDDRG4 ((__O)&DDRG)->bit.b4
#define ioPORTG4 ((__O)&PORTG)->bit.b4
#define ioPING4 ((__I)&PING)->bit.b4
#endif
#if defined (PG5)
#define ioDDRG5 ((__O)&DDRG)->bit.b5
#define ioPORTG5 ((__O)&PORTG)->bit.b5
#define ioPING5 ((__I)&PING)->bit.b5
#endif
#if defined (PG6)
#define ioDDRG6 ((__O)&DDRG)->bit.b6
#define ioPORTG6 ((__O)&PORTG)->bit.b6
#define ioPING6 ((__I)&PING)->bit.b6
#endif
#if defined (PG7)
#define ioDDRG7 ((__O)&DDRG)->bit.b7
#define ioPORTG7 ((__O)&PORTG)->bit.b7
#define ioPING7 ((__I)&PING)->bit.b7
#endif
#endif


#if defined (PORTH) 
#define     ioDDRH ((__O)&DDRH)->byte
#define     ioPORTH ((__O)&PORTH)->byte
#define     ioPINH ((__I)&PINH)->byte
#if defined (PH0)
#define ioDDRH0 ((__O)&DDRH)->bit.b0
#define ioPORTH0 ((__O)&PORTH)->bit.b0
#define ioPINH0 ((__I)&PINH)->bit.b0
#endif
#if defined (PH1)
#define ioDDRH1 ((__O)&DDRH)->bit.b1
#define ioPORTH1 ((__O)&PORTH)->bit.b1
#define ioPINH1 ((__I)&PINH)->bit.b1
#endif
#if defined (PH2)
#define ioDDRH2 ((__O)&DDRH)->bit.b2
#define ioPORTH2 ((__O)&PORTH)->bit.b2
#define ioPINH2 ((__I)&PINH)->bit.b2
#endif
#if defined (PH3)
#define ioDDRH3 ((__O)&DDRH)->bit.b3
#define ioPORTH3 ((__O)&PORTH)->bit.b3
#define ioPINH3 ((__I)&PINH)->bit.b3
#endif
#if defined (PH4)
#define ioDDRH4 ((__O)&DDRH)->bit.b4
#define ioPORTH4 ((__O)&PORTH)->bit.b4
#define ioPINH4 ((__I)&PINH)->bit.b4
#endif
#if defined (PH5)
#define ioDDRH5 ((__O)&DDRH)->bit.b5
#define ioPORTH5 ((__O)&PORTH)->bit.b5
#define ioPINH5 ((__I)&PINH)->bit.b5
#endif
#if defined (PH6)
#define ioDDRH6 ((__O)&DDRH)->bit.b6
#define ioPORTH6 ((__O)&PORTH)->bit.b6
#define ioPINH6 ((__I)&PINH)->bit.b6
#endif
#if defined (PH7)
#define ioDDRH7 ((__O)&DDRH)->bit.b7
#define ioPORTH7 ((__O)&PORTH)->bit.b7
#define ioPINH7 ((__I)&PINH)->bit.b7
#endif
#endif


#if defined (PORTJ) 
#define     ioDDRJ ((__O)&DDRJ)->byte
#define     ioPORTJ ((__O)&PORTJ)->byte
#define     ioPINJ ((__I)&PINJ)->byte
#if defined (PJ0)
#define ioDDRJ0 ((__O)&DDRJ)->bit.b0
#define ioPORTJ0 ((__O)&PORTJ)->bit.b0
#define ioPINJ0 ((__I)&PINJ)->bit.b0
#endif
#if defined (PJ1)
#define ioDDRJ1 ((__O)&DDRJ)->bit.b1
#define ioPORTJ1 ((__O)&PORTJ)->bit.b1
#define ioPINJ1 ((__I)&PINJ)->bit.b1
#endif
#if defined (PJ2)
#define ioDDRJ2 ((__O)&DDRJ)->bit.b2
#define ioPORTJ2 ((__O)&PORTJ)->bit.b2
#define ioPINJ2 ((__I)&PINJ)->bit.b2
#endif
#if defined (PJ3)
#define ioDDRJ3 ((__O)&DDRJ)->bit.b3
#define ioPORTJ3 ((__O)&PORTJ)->bit.b3
#define ioPINJ3 ((__I)&PINJ)->bit.b3
#endif
#if defined (PJ4)
#define ioDDRJ4 ((__O)&DDRJ)->bit.b4
#define ioPORTJ4 ((__O)&PORTJ)->bit.b4
#define ioPINJ4 ((__I)&PINJ)->bit.b4
#endif
#if defined (PJ5)
#define ioDDRJ5 ((__O)&DDRJ)->bit.b5
#define ioPORTJ5 ((__O)&PORTJ)->bit.b5
#define ioPINJ5 ((__I)&PINJ)->bit.b5
#endif
#if defined (PJ6)
#define ioDDRJ6 ((__O)&DDRJ)->bit.b6
#define ioPORTJ6 ((__O)&PORTJ)->bit.b6
#define ioPINJ6 ((__I)&PINJ)->bit.b6
#endif
#if defined (PJ7)
#define ioDDRJ7 ((__O)&DDRJ)->bit.b7
#define ioPORTJ7 ((__O)&PORTJ)->bit.b7
#define ioPINJ7 ((__I)&PINJ)->bit.b7
#endif
#endif


#if defined (PORTK) 
#define     ioDDRK ((__O)&DDRK)->byte
#define     ioPORTK ((__O)&PORTK)->byte
#define     ioPINK ((__I)&PINK)->byte
#if defined (PK0)
#define ioDDRK0 ((__O)&DDRK)->bit.b0
#define ioPORTK0 ((__O)&PORTK)->bit.b0
#define ioPINK0 ((__I)&PINK)->bit.b0
#endif
#if defined (PK1)
#define ioDDRK1 ((__O)&DDRK)->bit.b1
#define ioPORTK1 ((__O)&PORTK)->bit.b1
#define ioPINK1 ((__I)&PINK)->bit.b1
#endif
#if defined (PK2)
#define ioDDRK2 ((__O)&DDRK)->bit.b2
#define ioPORTK2 ((__O)&PORTK)->bit.b2
#define ioPINK2 ((__I)&PINK)->bit.b2
#endif
#if defined (PK3)
#define ioDDRK3 ((__O)&DDRK)->bit.b3
#define ioPORTK3 ((__O)&PORTK)->bit.b3
#define ioPINK3 ((__I)&PINK)->bit.b3
#endif
#if defined (PK4)
#define ioDDRK4 ((__O)&DDRK)->bit.b4
#define ioPORTK4 ((__O)&PORTK)->bit.b4
#define ioPINK4 ((__I)&PINK)->bit.b4
#endif
#if defined (PK5)
#define ioDDRK5 ((__O)&DDRK)->bit.b5
#define ioPORTK5 ((__O)&PORTK)->bit.b5
#define ioPINK5 ((__I)&PINK)->bit.b5
#endif
#if defined (PK6)
#define ioDDRK6 ((__O)&DDRK)->bit.b6
#define ioPORTK6 ((__O)&PORTK)->bit.b6
#define ioPINK6 ((__I)&PINK)->bit.b6
#endif
#if defined (PK7)
#define ioDDRK7 ((__O)&DDRK)->bit.b7
#define ioPORTK7 ((__O)&PORTK)->bit.b7
#define ioPINK7 ((__I)&PINK)->bit.b7
#endif
#endif


#if defined (PORTL) 
#define     ioDDRL ((__O)&DDRL)->byte
#define     ioPORTL ((__O)&PORTL)->byte
#define     ioPINL ((__I)&PINL)->byte
#if defined (PL0)
#define ioDDRL0 ((__O)&DDRL)->bit.b0
#define ioPORTL0 ((__O)&PORTL)->bit.b0
#define ioPINL0 ((__I)&PINL)->bit.b0
#endif
#if defined (PL1)
#define ioDDRL1 ((__O)&DDRL)->bit.b1
#define ioPORTL1 ((__O)&PORTL)->bit.b1
#define ioPINL1 ((__I)&PINL)->bit.b1
#endif
#if defined (PL2)
#define ioDDRL2 ((__O)&DDRL)->bit.b2
#define ioPORTL2 ((__O)&PORTL)->bit.b2
#define ioPINL2 ((__I)&PINL)->bit.b2
#endif
#if defined (PL3)
#define ioDDRL3 ((__O)&DDRL)->bit.b3
#define ioPORTL3 ((__O)&PORTL)->bit.b3
#define ioPINL3 ((__I)&PINL)->bit.b3
#endif
#if defined (PL4)
#define ioDDRL4 ((__O)&DDRL)->bit.b4
#define ioPORTL4 ((__O)&PORTL)->bit.b4
#define ioPINL4 ((__I)&PINL)->bit.b4
#endif
#if defined (PL5)
#define ioDDRL5 ((__O)&DDRL)->bit.b5
#define ioPORTL5 ((__O)&PORTL)->bit.b5
#define ioPINL5 ((__I)&PINL)->bit.b5
#endif
#if defined (PL6)
#define ioDDRL6 ((__O)&DDRL)->bit.b6
#define ioPORTL6 ((__O)&PORTL)->bit.b6
#define ioPINL6 ((__I)&PINL)->bit.b6
#endif
#if defined (PL7)
#define ioDDRL7 ((__O)&DDRL)->bit.b7
#define ioPORTL7 ((__O)&PORTL)->bit.b7
#define ioPINL7 ((__I)&PINL)->bit.b7
#endif
#endif

/*******************************************************************************
* Variable Section
********************************************************************************/

/*******************************************************************************
* Function Prototype Section
********************************************************************************/

#endif /* _AVR_IO_BIT_H_INCLUDED */

/************** Copyright (C) 2009,2015 firmware.c@Electoday *******END OF FILE*********/

4
Toshiba Carrier (Thailand) ต้องการ รับสมัคร Embedded Software Engineer หรือ Senior Embedded Software Engineer เพิ่มเติม

หน้าที่หลักๆคือ develop firmware สำหรับ air conditioner ทั้ง Inverter type และ Fix speed type ใช้ Embedded C เป็นส่วนใหญ่ ท่านไหนสนใจ PM ถามรายละเอียดกับผมก่อนได้ครับ


Qualifications:

• Thai nationality only
• Bachelor degree of Electronics, Electrical, Mechatronics or related field
• 0 - 3 year experience in related field.
• Knowledge in microcontroller architecture and peripheral module (UART/12C/SPI etc.)
• Understand on Embedded software development process
• Must be understand on Embedded C programing for Microcontroller
• Familiar with Embedded software development tools ( ICE,JTAG, Embedded C compiler, etc.)
• Understand on microcontroller interface circuit.
• Analytical skill and proactive of thermodynamic.
• Ability to work in a team and in a collaborative and cooperative manner.
• Good command in English.

Key Responsibilities:

• Develop firmware for Residential air-conditioner
• Software document design follow as specification requirement.
• Implement coding microcontroller firmware by using Embedded C language.
• Debugging test and document report.
• Cooperate with Hardware engineer and Functional engineer team.
• Maintain firmware for future modification.

Attractive remuneration package commensurate with qualifications and experience will be offered to the successful candidates. Interested persons are invited to send an application letter with an updated resume detailing work experience, recent photo and expected salary to:

pensri.kotprathum@tctc.toshiba.co.jp

We look forward to your application.

Toshiba Carrier (Thailand) Co., Ltd.
Human Resource Department
144/9 Moo5, Bangkadi Industrial Park, Tiwanon Road, Muang, Pathumthani 12000, Thailand
Tel: 0-2832-3100 ext. 4666
Website: www.toshiba-aircon.in.th


5
บริษัท Toshiba Carrier (Thailand) Co., Ltd. ต้องการรับสมัคร Embedded Software Engineer รายละเอียดตามด้านล่างครับ
หากมีประสบการณ์แล้วจะได้รับการพิจารณาเป็นพิเศษ ใครสนใจหรืออยากถามรายละเอียดเพิ่มเติม PM มาถามผมก่อนได้ครับ

Qualifications:

• Thai nationality only
• Male age 22 - 32 years.
• Bachelor degree of Electronics, Electrical, Mechatronics or related field
• Knowledge in microcontroller architecture and peripheral module (UART/12C/SPI etc.)
• Understand on Embedded software development process
• Must be understand on Embedded C programing for Microcontroller
• Familiar with Embedded software development tools ( ICE,JTAG, Embedded C compiler, etc.)
• Understand on microcontroller interface circuit.
• Analytical skill and proactive of thermodynamic.
• Ability to work in a team and in a collaborative and cooperative manner.
• Good command in English.

Key Responsibilities:

• Develop firmware for Residential air-conditioner
• Software document design follow as specification requirement.
• Implement coding microcontroller firmware by using Embedded C language.
• Debugging test and document report.
• Cooperate with Hardware engineer and Functional engineer team.
• Maintain firmware for future modification.

Attractive remuneration package commensurate with qualifications and experience will be offered to the successful candidates. Interested persons are invited to send an application letter with an updated resume detailing work experience, recent photo and expected salary to:

pensri.kotprathum@tctc.toshiba.co.jp

We look forward to your application.

Toshiba Carrier (Thailand) Co., Ltd.
Human Resource Department
144/9 Moo5, Bangkadi Industrial Park, Tiwanon Road, Muang, Pathumthani 12000, Thailand
Tel: 0-2832-3100 ext. 4666
Website: www.toshiba-aircon.in.th

ขอบคุณครับ


6
Qualifications:

• Thai nationality only
• Male or female age 22-28 years.
• Bachelor degree of Mechanical, Mechatronic, Electrical and Electronics.
• 0-3 year experience in related field.
• Analytical skill and proactive of thermodynamic.
• Ability to work in a team and in a collaborative and cooperative manner.
• Good command in English.

Key Responsibilities:

• Design and Development new product.
• Promotion of value analysis and cost reduction.
• Improve quality and reliability of new and existing products
• Organization development and administration.


Attractive remuneration package commensurate with qualifications and experience will be offered to the successful candidates. Interested persons are invited to send an application letter with an updated resume detailing work experience, recent photo and expected salary to:

Pensri.kotprathum@tctc.toshiba.co.jp

We  look forward to your application.

Toshiba Carrier (Thailand) Co., Ltd.
Human Resource Department
144/9 Moo5, Bangkadi Industrial Park, Tiwanon Road, Muang, Pathumthani 12000, Thailand
Tel: 0-2832-3100 ext. 4666, 3172
Website: www.toshiba-aircon.in.th

http://www.jobtopgun.com/search/popup/jobpost.jsp?idEmp=18261&idPosition=45

Scope งานคร่าวๆ (เนื่องจากใน web เค้าประกาศรับแบบคลุมเครือไม่ได้ระบุชัดเจนว่าเป็น electronics) มีหน้าที่ออกแบบ electronics circuit, PCB รวมถึงทดสอบให้ได้ตามมาตรฐาน


7
Qualifications:

• Thai nationality only
• Male age 22 - 25 years.
• Bachelor degree of Electronics, Electrical, Mechatronics or related field
• 0 - 3 year experience in related field.
• Knowledge in microcontroller architecture and peripheral module (UART/12C/SPI etc.)
• Understand on Embedded software development process
• Must be understand on Embedded C programing for Microcontroller
• Familiar with Embedded software development tools ( ICE,JTAG, Embedded C compiler, etc.)
• Understand on microcontroller interface circuit.
• Analytical skill and proactive of thermodynamic.
• Ability to work in a team and in a collaborative and cooperative manner.
• Good command in English.

Key Responsibilities:

• Develop firmware for Residential air-conditioner
• Software document design follow as specification requirement.
• Implement coding microcontroller firmware by using Embedded C language.
• Debugging test and document report.
• Cooperate with Hardware engineer and Functional engineer team.
• Maintain firmware for future modification.

Attractive remuneration package commensurate with qualifications and experience will be offered to the successful candidates. Interested persons are invited to send an application letter with an updated resume detailing work experience, recent photo and expected salary to:

pensri.kotprathum@tctc.toshiba.co.jp

We look forward to your application.

Toshiba Carrier (Thailand) Co., Ltd.
Human Resource Department
144/9 Moo5, Bangkadi Industrial Park, Tiwanon Road, Muang, Pathumthani 12000, Thailand
Tel: 0-2832-3100 ext. 4666
Website: www.toshiba-aircon.in.th

http://www.jobtopgun.com/search/popup/jobpost.jsp?idEmp=18261&idPosition=60

ยังเปิดรับสมัครอยู่นะครับใครสนใจเข้ามาคุยกันก่อนได้ หน้าที่หลักๆคือ develop firmware สำหรับ air conditioner ต้องทำงานร่วมกับที่ม hardware design

Pages: [1] 2