Collection of common Macros in Linux Kernel
I. Interruptions:
1. interrupt type: Use # define sa_shirq shared interrupt in request_irq (IRQ, handler, flags, devname, dev_id) (earlier than 2.6.19 kernel) # define irqf_shared interrupt (new version) # define sa_interrupt quick interrupt (earlier version) # define irqf_disabled quick interrupt (new version) # define irqf_sample_random indicates that the current interrupt source can be used as the entropy pool of the random number generator.
2. trigger type of Interruption: Used in set_irq_type (IRQ, type) # define irq_type_none 0x00000000 unspecified type # define irq_type_edge_rising 0x00000001 rising edge triggering # define limit 0x00000002 descent edge triggering
# Define irq_type_edge_both (irq_type_edge_falling | irq_type_edge_rising)
# Define irq_type_level_high 0x00000004 High Level Trigger # define irq_type_level_low 0x00000008 Low Level Trigger # define irq_type_sense_mask 0x0000000f/* mask of the above */
# Define irq_type_probe 0x00000010/* probing in progress */
Ii. Display Device framebuffer color display class:1. monochrome: there are only two colors for each pixel, which are non-bright or dark. They are represented by macro fb_visual_mono01 and fb_visual_mono10 respectively. 2. pseudocolor: fb_visual_pseudo color and fb_visual_static_pseudo color are used for representation. 3. true Color: fb_visual_truecolor; 4. direct color: fb_visual_directcolor; 5. grayscale: Use fb_visual_pseudo color and fb_visual_static_pseudo color.